swc/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts

22 lines
489 B
TypeScript
Raw Normal View History

class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; }
}
module Point {
function Origin() { return ""; }// not an error, since not exported
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; }
}
export module Point {
function Origin() { return ""; }// not an error since not exported
}
}