TypeScript/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.types

56 lines
1.1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts ===
class Point {
>Point : Point
2014-08-15 23:33:16 +02:00
constructor(public x: number, public y: number) { }
>x : number
>y : number
2014-08-15 23:33:16 +02:00
static Origin(): Point { return { x: 0, y: 0 }; }
>Origin : () => Point
>Point : Point
2014-08-15 23:33:16 +02:00
>{ x: 0, y: 0 } : { x: number; y: number; }
>x : number
2015-04-13 21:36:11 +02:00
>0 : number
>y : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
}
module Point {
>Point : typeof Point
2014-08-15 23:33:16 +02:00
function Origin() { return ""; }// not an error, since not exported
>Origin : () => string
2015-04-13 21:36:11 +02:00
>"" : string
2014-08-15 23:33:16 +02:00
}
module A {
>A : typeof A
2014-08-15 23:33:16 +02:00
export class Point {
>Point : Point
2014-08-15 23:33:16 +02:00
constructor(public x: number, public y: number) { }
>x : number
>y : number
2014-08-15 23:33:16 +02:00
static Origin(): Point { return { x: 0, y: 0 }; }
>Origin : () => Point
>Point : Point
2014-08-15 23:33:16 +02:00
>{ x: 0, y: 0 } : { x: number; y: number; }
>x : number
2015-04-13 21:36:11 +02:00
>0 : number
>y : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
}
export module Point {
>Point : typeof Point
2014-08-15 23:33:16 +02:00
function Origin() { return ""; }// not an error since not exported
>Origin : () => string
2015-04-13 21:36:11 +02:00
>"" : string
2014-08-15 23:33:16 +02:00
}
}