This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Static members on function not emitted #874
Copy link
Copy link
Open
Description
I tried this twice, with goog.provide and goog.module, with similar results:
Actual
Using Provide
goog.provide('lib.my');
/**
* @param {string} data
*/
lib.my.resemble = function(data) {};
/** @returns {string} data */
lib.my.resemble.staticOne = function(data) {};
/**
* @const
* @type {function(string)}
*/
lib.my.resemble.staticTwo = function(data) {};Processing that using:
clutz_release.jar ./test.jsproduces
declare namespace ಠ_ಠ.clutz.lib.my {
function resemble (data : string ) : void ;
}
declare module 'goog:lib.my' {
import my = ಠ_ಠ.clutz.lib.my;
export = my;
}Using Module
goog.module('lib.my');
/**
* @param {string} data
*/
var resemble = function(data) {};
/** @returns {string} data */
resemble.staticOne = function(data) {};
/**
* @const
* @type {function(string)}
*/
resemble.staticTwo = function(data) {};
exports.resemble = resemble;Outputs:
declare namespace ಠ_ಠ.clutz.module$exports$lib$my {
function resemble (data : string ) : void ;
}
declare module 'goog:lib.my' {
import my = ಠ_ಠ.clutz.module$exports$lib$my;
export = my;
}Expected
declare namespace ಠ_ಠ.clutz.module$exports$lib$my {
namespace resemble {
function staticOne (data : any ) : string ;
function staticTwo (a : string ) : any ;
}
function resemble (data : string ) : void ;
}
declare module 'goog:lib.my' {
import my = ಠ_ಠ.clutz.module$exports$lib$my;
export = my;
}Metadata
Metadata
Assignees
Labels
No labels