2014-11-30 20:47:41 +01:00
|
|
|
=== tests/cases/compiler/isDeclarationVisibleNodeKinds.ts ===
|
|
|
|
|
|
|
|
// Function types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator1(schema: any): <T>(data: T) => T {
|
|
|
|
>createValidator1 : (schema: any) => <T>(data: T) => T
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator2(schema: any): new <T>(data: T) => T {
|
|
|
|
>createValidator2 : (schema: any) => new <T>(data: T) => T
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// union types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator3(schema: any): number | { new <T>(data: T): T; } {
|
|
|
|
>createValidator3 : (schema: any) => number | (new <T>(data: T) => T)
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Array types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator4(schema: any): { new <T>(data: T): T; }[] {
|
|
|
|
>createValidator4 : (schema: any) => (new <T>(data: T) => T)[]
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TypeLiterals
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator5(schema: any): { new <T>(data: T): T } {
|
|
|
|
>createValidator5 : (schema: any) => new <T>(data: T) => T
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Tuple types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator6(schema: any): [ new <T>(data: T) => T, number] {
|
|
|
|
>createValidator6 : (schema: any) => [new <T>(data: T) => T, number]
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paren Types
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator7(schema: any): (new <T>(data: T)=>T )[] {
|
|
|
|
>createValidator7 : (schema: any) => (new <T>(data: T) => T)[]
|
|
|
|
>schema : any
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
2014-12-01 08:54:21 +01:00
|
|
|
|
|
|
|
// Type reference
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export function createValidator8(schema: any): Array<{ <T>(data: T) : T}> {
|
|
|
|
>createValidator8 : (schema: any) => (<T>(data: T) => T)[]
|
|
|
|
>schema : any
|
|
|
|
>Array : T[]
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-12-01 22:20:56 +01:00
|
|
|
|
|
|
|
module schema {
|
|
|
|
>schema : typeof schema
|
|
|
|
|
|
|
|
export class T {
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
get createValidator9(): <T>(data: T) => T {
|
|
|
|
>createValidator9 : <T>(data: T) => T
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
|
|
|
|
set createValidator10(v: <T>(data: T) => T) {
|
|
|
|
>createValidator10 : <T>(data: T) => T
|
|
|
|
>v : <T>(data: T) => T
|
|
|
|
>T : T
|
|
|
|
>data : T
|
|
|
|
>T : T
|
|
|
|
>T : T
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|