TypeScript/tests/baselines/reference/moduleWithStatementsOfEveryKind.types

177 lines
7.3 KiB
Text

=== tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts ===
module A {
>A : typeof A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,0,0))
class A { s: string }
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,0,10))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,1,13))
class AA<T> { s: T }
>AA : AA<T>, Symbol(AA,Decl(moduleWithStatementsOfEveryKind.ts,1,25))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,2,13))
>s : T, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,2,17))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,2,13))
interface I { id: number }
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,2,24))
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,3,17))
class B extends AA<string> implements I { id: number }
>B : B, Symbol(B,Decl(moduleWithStatementsOfEveryKind.ts,3,30))
>AA : AA<T>, Symbol(AA,Decl(moduleWithStatementsOfEveryKind.ts,1,25))
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,2,24))
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,5,45))
class BB<T> extends A {
>BB : BB<T>, Symbol(BB,Decl(moduleWithStatementsOfEveryKind.ts,5,58))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,6,13))
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,0,10))
id: number;
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,6,27))
}
module Module {
>Module : typeof Module, Symbol(Module,Decl(moduleWithStatementsOfEveryKind.ts,8,5))
class A { s: string }
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,10,19))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,11,17))
}
enum Color { Blue, Red }
>Color : Color, Symbol(Color,Decl(moduleWithStatementsOfEveryKind.ts,12,5))
>Blue : Color, Symbol(Color.Blue,Decl(moduleWithStatementsOfEveryKind.ts,13,16))
>Red : Color, Symbol(Color.Red,Decl(moduleWithStatementsOfEveryKind.ts,13,22))
var x = 12;
>x : number, Symbol(x,Decl(moduleWithStatementsOfEveryKind.ts,14,7))
>12 : number
function F(s: string): number {
>F : (s: string) => number, Symbol(F,Decl(moduleWithStatementsOfEveryKind.ts,14,15))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,15,15))
return 2;
>2 : number
}
var array: I[] = null;
>array : I[], Symbol(array,Decl(moduleWithStatementsOfEveryKind.ts,18,7))
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,2,24))
>null : null
var fn = (s: string) => {
>fn : (s: string) => string, Symbol(fn,Decl(moduleWithStatementsOfEveryKind.ts,19,7))
>(s: string) => { return 'hello ' + s; } : (s: string) => string
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,19,14))
return 'hello ' + s;
>'hello ' + s : string
>'hello ' : string
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,19,14))
}
var ol = { s: 'hello', id: 2, isvalid: true };
>ol : { s: string; id: number; isvalid: boolean; }, Symbol(ol,Decl(moduleWithStatementsOfEveryKind.ts,22,7))
>{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; }
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,22,14))
>'hello' : string
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,22,26))
>2 : number
>isvalid : boolean, Symbol(isvalid,Decl(moduleWithStatementsOfEveryKind.ts,22,33))
>true : boolean
declare class DC {
>DC : DC, Symbol(DC,Decl(moduleWithStatementsOfEveryKind.ts,22,50))
static x: number;
>x : number, Symbol(DC.x,Decl(moduleWithStatementsOfEveryKind.ts,24,22))
}
}
module Y {
>Y : typeof Y, Symbol(Y,Decl(moduleWithStatementsOfEveryKind.ts,27,1))
export class A { s: string }
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,29,10))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,30,20))
export class AA<T> { s: T }
>AA : AA<T>, Symbol(AA,Decl(moduleWithStatementsOfEveryKind.ts,30,32))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,31,20))
>s : T, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,31,24))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,31,20))
export interface I { id: number }
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,31,31))
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,32,24))
export class B extends AA<string> implements I { id: number }
>B : B, Symbol(B,Decl(moduleWithStatementsOfEveryKind.ts,32,37))
>AA : AA<T>, Symbol(AA,Decl(moduleWithStatementsOfEveryKind.ts,30,32))
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,31,31))
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,34,52))
export class BB<T> extends A {
>BB : BB<T>, Symbol(BB,Decl(moduleWithStatementsOfEveryKind.ts,34,65))
>T : T, Symbol(T,Decl(moduleWithStatementsOfEveryKind.ts,35,20))
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,29,10))
id: number;
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,35,34))
}
export module Module {
>Module : typeof Module, Symbol(Module,Decl(moduleWithStatementsOfEveryKind.ts,37,5))
class A { s: string }
>A : A, Symbol(A,Decl(moduleWithStatementsOfEveryKind.ts,39,26))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,40,17))
}
export enum Color { Blue, Red }
>Color : Color, Symbol(Color,Decl(moduleWithStatementsOfEveryKind.ts,41,5))
>Blue : Color, Symbol(Color.Blue,Decl(moduleWithStatementsOfEveryKind.ts,42,23))
>Red : Color, Symbol(Color.Red,Decl(moduleWithStatementsOfEveryKind.ts,42,29))
export var x = 12;
>x : number, Symbol(x,Decl(moduleWithStatementsOfEveryKind.ts,43,14))
>12 : number
export function F(s: string): number {
>F : (s: string) => number, Symbol(F,Decl(moduleWithStatementsOfEveryKind.ts,43,22))
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,44,22))
return 2;
>2 : number
}
export var array: I[] = null;
>array : I[], Symbol(array,Decl(moduleWithStatementsOfEveryKind.ts,47,14))
>I : I, Symbol(I,Decl(moduleWithStatementsOfEveryKind.ts,31,31))
>null : null
export var fn = (s: string) => {
>fn : (s: string) => string, Symbol(fn,Decl(moduleWithStatementsOfEveryKind.ts,48,14))
>(s: string) => { return 'hello ' + s; } : (s: string) => string
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,48,21))
return 'hello ' + s;
>'hello ' + s : string
>'hello ' : string
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,48,21))
}
export var ol = { s: 'hello', id: 2, isvalid: true };
>ol : { s: string; id: number; isvalid: boolean; }, Symbol(ol,Decl(moduleWithStatementsOfEveryKind.ts,51,14))
>{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; }
>s : string, Symbol(s,Decl(moduleWithStatementsOfEveryKind.ts,51,21))
>'hello' : string
>id : number, Symbol(id,Decl(moduleWithStatementsOfEveryKind.ts,51,33))
>2 : number
>isvalid : boolean, Symbol(isvalid,Decl(moduleWithStatementsOfEveryKind.ts,51,40))
>true : boolean
export declare class DC {
>DC : DC, Symbol(DC,Decl(moduleWithStatementsOfEveryKind.ts,51,57))
static x: number;
>x : number, Symbol(DC.x,Decl(moduleWithStatementsOfEveryKind.ts,53,29))
}
}