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