mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
module.ts(2,22): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
|
simple.ts(3,22): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
|
|
|
|
|
==== module.ts (1 errors) ====
|
|
namespace A {
|
|
export namespace Point {
|
|
~~~~~
|
|
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged.
|
|
export var Origin = { x: 0, y: 0 };
|
|
}
|
|
}
|
|
|
|
==== function.ts (0 errors) ====
|
|
namespace A {
|
|
// duplicate identifier error
|
|
export function Point() {
|
|
return { x: 0, y: 0 };
|
|
}
|
|
}
|
|
|
|
==== simple.ts (1 errors) ====
|
|
namespace B {
|
|
|
|
export namespace Point {
|
|
~~~~~
|
|
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged.
|
|
export var Origin = { x: 0, y: 0 };
|
|
}
|
|
|
|
// duplicate identifier error
|
|
export function Point() {
|
|
return { x: 0, y: 0 };
|
|
}
|
|
}
|
|
|