mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
69 lines
2.1 KiB
Plaintext
69 lines
2.1 KiB
Plaintext
duplicateIdentifiersAcrossContainerBoundaries.ts(9,21): error TS2814: Function with bodies can only merge with classes that are ambient.
|
|
duplicateIdentifiersAcrossContainerBoundaries.ts(12,18): error TS2813: Class declaration cannot implement overload list for 'f'.
|
|
duplicateIdentifiersAcrossContainerBoundaries.ts(37,12): error TS2300: Duplicate identifier 'x'.
|
|
duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): error TS2300: Duplicate identifier 'x'.
|
|
|
|
|
|
==== duplicateIdentifiersAcrossContainerBoundaries.ts (4 errors) ====
|
|
namespace M {
|
|
export interface I { }
|
|
}
|
|
namespace M {
|
|
export class I { }
|
|
}
|
|
|
|
namespace M {
|
|
export function f() { }
|
|
~
|
|
!!! error TS2814: Function with bodies can only merge with classes that are ambient.
|
|
!!! related TS6506 duplicateIdentifiersAcrossContainerBoundaries.ts:12:18: Consider adding a 'declare' modifier to this class.
|
|
}
|
|
namespace M {
|
|
export class f { } // error
|
|
~
|
|
!!! error TS2813: Class declaration cannot implement overload list for 'f'.
|
|
!!! related TS6506 duplicateIdentifiersAcrossContainerBoundaries.ts:12:18: Consider adding a 'declare' modifier to this class.
|
|
}
|
|
|
|
namespace M {
|
|
function g() { }
|
|
}
|
|
namespace M {
|
|
export class g { } // no error
|
|
}
|
|
|
|
namespace M {
|
|
export class C { }
|
|
}
|
|
namespace M {
|
|
function C() { } // no error
|
|
}
|
|
|
|
namespace M {
|
|
export var v = 3;
|
|
}
|
|
namespace M {
|
|
export var v = 3; // error for redeclaring var in a different parent
|
|
}
|
|
|
|
class Foo {
|
|
static x: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
}
|
|
|
|
namespace Foo {
|
|
export var x: number; // error for redeclaring var in a different parent
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
}
|
|
|
|
namespace N {
|
|
export namespace F {
|
|
var t;
|
|
}
|
|
}
|
|
declare namespace N {
|
|
export function F(); // no error because function is ambient
|
|
}
|
|
|