mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
32 lines
861 B
TypeScript
32 lines
861 B
TypeScript
//// [tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts] ////
|
|
|
|
//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts]
|
|
class clodule<T> {
|
|
id: string;
|
|
value: T;
|
|
|
|
private static sfn(id: string) { return 42; }
|
|
}
|
|
|
|
namespace clodule {
|
|
// error: duplicate identifier expected
|
|
export function fn<T>(x: T, y: T): number {
|
|
return clodule.sfn('a');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//// [ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js]
|
|
"use strict";
|
|
class clodule {
|
|
static sfn(id) { return 42; }
|
|
}
|
|
(function (clodule) {
|
|
// error: duplicate identifier expected
|
|
function fn(x, y) {
|
|
return clodule.sfn('a');
|
|
}
|
|
clodule.fn = fn;
|
|
})(clodule || (clodule = {}));
|