44 lines
No EOL
844 B
Text
44 lines
No EOL
844 B
Text
==== tests/cases/compiler/mergedDeclarations3.ts (2 errors) ====
|
|
module M {
|
|
export enum Color {
|
|
Red, Green
|
|
}
|
|
}
|
|
module M {
|
|
export module Color {
|
|
export var Blue = 4;
|
|
}
|
|
}
|
|
var p = M.Color.Blue; // ok
|
|
|
|
module M {
|
|
export function foo() {
|
|
}
|
|
}
|
|
|
|
module M {
|
|
module foo {
|
|
export var x = 1;
|
|
}
|
|
}
|
|
|
|
module M {
|
|
export module foo {
|
|
export var y = 2
|
|
}
|
|
}
|
|
|
|
module M {
|
|
module foo {
|
|
export var z = 1;
|
|
}
|
|
}
|
|
|
|
M.foo() // ok
|
|
M.foo.x // error
|
|
~
|
|
!!! Property 'x' does not exist on type 'typeof foo'.
|
|
M.foo.y // ok
|
|
M.foo.z // error
|
|
~
|
|
!!! Property 'z' does not exist on type 'typeof foo'. |