mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 11:42:13 +03:00
46 lines
713 B
TypeScript
46 lines
713 B
TypeScript
module A {
|
|
// these 2 statements force an underscore before the 'A'
|
|
// in the generated function call.
|
|
var A = 12;
|
|
var _A = '';
|
|
}
|
|
|
|
module B {
|
|
var A = 12;
|
|
}
|
|
|
|
module B {
|
|
// re-opened module with colliding name
|
|
// this should add an underscore.
|
|
class B {
|
|
name: string;
|
|
}
|
|
}
|
|
|
|
module X {
|
|
var X = 13;
|
|
export module Y {
|
|
var Y = 13;
|
|
export module Z {
|
|
var X = 12;
|
|
var Y = 12;
|
|
var Z = 12;
|
|
}
|
|
}
|
|
}
|
|
|
|
module Y.Y {
|
|
export enum Y {
|
|
Red, Blue
|
|
}
|
|
}
|
|
|
|
// no collision, since interface doesn't
|
|
// generate code.
|
|
module D {
|
|
export interface D {
|
|
id: number;
|
|
}
|
|
|
|
export var E = 'hello';
|
|
} |