177 lines
3 KiB
Text
177 lines
3 KiB
Text
=== tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts ===
|
|
module A {
|
|
>A : typeof A
|
|
|
|
class A { s: string }
|
|
>A : A
|
|
>s : string
|
|
|
|
class AA<T> { s: T }
|
|
>AA : AA<T>
|
|
>T : T
|
|
>s : T
|
|
>T : T
|
|
|
|
interface I { id: number }
|
|
>I : I
|
|
>id : number
|
|
|
|
class B extends AA<string> implements I { id: number }
|
|
>B : B
|
|
>AA : AA<string>
|
|
>I : I
|
|
>id : number
|
|
|
|
class BB<T> extends A {
|
|
>BB : BB<T>
|
|
>T : T
|
|
>A : A
|
|
|
|
id: number;
|
|
>id : number
|
|
}
|
|
|
|
module Module {
|
|
>Module : typeof Module
|
|
|
|
class A { s: string }
|
|
>A : A
|
|
>s : string
|
|
}
|
|
enum Color { Blue, Red }
|
|
>Color : Color
|
|
>Blue : Color
|
|
>Red : Color
|
|
|
|
var x = 12;
|
|
>x : number
|
|
>12 : number
|
|
|
|
function F(s: string): number {
|
|
>F : (s: string) => number
|
|
>s : string
|
|
|
|
return 2;
|
|
>2 : number
|
|
}
|
|
var array: I[] = null;
|
|
>array : I[]
|
|
>I : I
|
|
>null : null
|
|
|
|
var fn = (s: string) => {
|
|
>fn : (s: string) => string
|
|
>(s: string) => { return 'hello ' + s; } : (s: string) => string
|
|
>s : string
|
|
|
|
return 'hello ' + s;
|
|
>'hello ' + s : string
|
|
>'hello ' : string
|
|
>s : string
|
|
}
|
|
var ol = { s: 'hello', id: 2, isvalid: true };
|
|
>ol : { s: string; id: number; isvalid: boolean; }
|
|
>{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; }
|
|
>s : string
|
|
>'hello' : string
|
|
>id : number
|
|
>2 : number
|
|
>isvalid : boolean
|
|
>true : boolean
|
|
|
|
declare class DC {
|
|
>DC : DC
|
|
|
|
static x: number;
|
|
>x : number
|
|
}
|
|
}
|
|
|
|
module Y {
|
|
>Y : typeof Y
|
|
|
|
export class A { s: string }
|
|
>A : A
|
|
>s : string
|
|
|
|
export class AA<T> { s: T }
|
|
>AA : AA<T>
|
|
>T : T
|
|
>s : T
|
|
>T : T
|
|
|
|
export interface I { id: number }
|
|
>I : I
|
|
>id : number
|
|
|
|
export class B extends AA<string> implements I { id: number }
|
|
>B : B
|
|
>AA : AA<string>
|
|
>I : I
|
|
>id : number
|
|
|
|
export class BB<T> extends A {
|
|
>BB : BB<T>
|
|
>T : T
|
|
>A : A
|
|
|
|
id: number;
|
|
>id : number
|
|
}
|
|
|
|
export module Module {
|
|
>Module : typeof Module
|
|
|
|
class A { s: string }
|
|
>A : A
|
|
>s : string
|
|
}
|
|
export enum Color { Blue, Red }
|
|
>Color : Color
|
|
>Blue : Color
|
|
>Red : Color
|
|
|
|
export var x = 12;
|
|
>x : number
|
|
>12 : number
|
|
|
|
export function F(s: string): number {
|
|
>F : (s: string) => number
|
|
>s : string
|
|
|
|
return 2;
|
|
>2 : number
|
|
}
|
|
export var array: I[] = null;
|
|
>array : I[]
|
|
>I : I
|
|
>null : null
|
|
|
|
export var fn = (s: string) => {
|
|
>fn : (s: string) => string
|
|
>(s: string) => { return 'hello ' + s; } : (s: string) => string
|
|
>s : string
|
|
|
|
return 'hello ' + s;
|
|
>'hello ' + s : string
|
|
>'hello ' : string
|
|
>s : string
|
|
}
|
|
export var ol = { s: 'hello', id: 2, isvalid: true };
|
|
>ol : { s: string; id: number; isvalid: boolean; }
|
|
>{ s: 'hello', id: 2, isvalid: true } : { s: string; id: number; isvalid: boolean; }
|
|
>s : string
|
|
>'hello' : string
|
|
>id : number
|
|
>2 : number
|
|
>isvalid : boolean
|
|
>true : boolean
|
|
|
|
export declare class DC {
|
|
>DC : DC
|
|
|
|
static x: number;
|
|
>x : number
|
|
}
|
|
}
|
|
|