1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts]
class clodule<T> {
id: string;
value: T;
static fn(id: string) { }
}
module clodule {
// error: duplicate identifier expected
export function fn<T>(x: T, y: T): T {
return x;
}
}
//// [ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js]
var clodule = (function () {
function clodule() {
}
clodule.fn = function (id) { };
return clodule;
}());
(function (clodule) {
// error: duplicate identifier expected
function fn(x, y) {
return x;
}
clodule.fn = fn;
})(clodule || (clodule = {}));
|