TypeScript/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js
2014-07-12 17:30:19 -07:00

34 lines
753 B
JavaScript

//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts]
class clodule<T> {
id: string;
value: T;
private static sfn(id: string) { return 42; }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): number {
return clodule.sfn('a');
}
}
//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js]
var clodule = (function () {
function clodule() {
}
clodule.sfn = function (id) {
return 42;
};
return clodule;
})();
var clodule;
(function (clodule) {
function fn(x, y) {
return clodule.sfn('a');
}
clodule.fn = fn;
})(clodule || (clodule = {}));