TypeScript/tests/baselines/reference/declFileConstructSignatures.types

122 lines
3 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/declFileConstructSignatures_0.ts ===
export interface IConstructSignature {
>IConstructSignature : IConstructSignature
2014-08-15 23:33:16 +02:00
/** This comment should appear for foo*/
new (): string;
}
export interface IConstructSignatureWithParameters {
>IConstructSignatureWithParameters : IConstructSignatureWithParameters
2014-08-15 23:33:16 +02:00
/** This is comment for function signature*/
new (/** this is comment about a*/a: string,
>a : string
2014-08-15 23:33:16 +02:00
/** this is comment for b*/
b: number);
>b : number
2014-08-15 23:33:16 +02:00
}
export interface IConstructSignatureWithRestParameters {
>IConstructSignatureWithRestParameters : IConstructSignatureWithRestParameters
2014-08-15 23:33:16 +02:00
new (a: string, ...rests: string[]): string;
>a : string
>rests : string[]
2014-08-15 23:33:16 +02:00
}
export interface IConstructSignatureWithOverloads {
>IConstructSignatureWithOverloads : IConstructSignatureWithOverloads
2014-08-15 23:33:16 +02:00
new (a: string): string;
>a : string
2014-08-15 23:33:16 +02:00
new (a: number): number;
>a : number
2014-08-15 23:33:16 +02:00
}
export interface IConstructSignatureWithTypeParameters<T> {
>IConstructSignatureWithTypeParameters : IConstructSignatureWithTypeParameters<T>
>T : T
2014-08-15 23:33:16 +02:00
/** This comment should appear for foo*/
new (a: T): T;
>a : T
>T : T
>T : T
2014-08-15 23:33:16 +02:00
}
export interface IConstructSignatureWithOwnTypeParametes {
>IConstructSignatureWithOwnTypeParametes : IConstructSignatureWithOwnTypeParametes
2014-08-15 23:33:16 +02:00
new <T extends IConstructSignature>(a: T): T;
>T : T
>IConstructSignature : IConstructSignature
>a : T
>T : T
>T : T
2014-08-15 23:33:16 +02:00
}
=== tests/cases/compiler/declFileConstructSignatures_1.ts ===
interface IGlobalConstructSignature {
>IGlobalConstructSignature : IGlobalConstructSignature
2014-08-15 23:33:16 +02:00
/** This comment should appear for foo*/
new (): string;
}
interface IGlobalConstructSignatureWithParameters {
>IGlobalConstructSignatureWithParameters : IGlobalConstructSignatureWithParameters
2014-08-15 23:33:16 +02:00
/** This is comment for function signature*/
new (/** this is comment about a*/a: string,
>a : string
2014-08-15 23:33:16 +02:00
/** this is comment for b*/
b: number);
>b : number
2014-08-15 23:33:16 +02:00
}
interface IGlobalConstructSignatureWithRestParameters {
>IGlobalConstructSignatureWithRestParameters : IGlobalConstructSignatureWithRestParameters
2014-08-15 23:33:16 +02:00
new (a: string, ...rests: string[]): string;
>a : string
>rests : string[]
2014-08-15 23:33:16 +02:00
}
interface IGlobalConstructSignatureWithOverloads {
>IGlobalConstructSignatureWithOverloads : IGlobalConstructSignatureWithOverloads
2014-08-15 23:33:16 +02:00
new (a: string): string;
>a : string
2014-08-15 23:33:16 +02:00
new (a: number): number;
>a : number
2014-08-15 23:33:16 +02:00
}
interface IGlobalConstructSignatureWithTypeParameters<T> {
>IGlobalConstructSignatureWithTypeParameters : IGlobalConstructSignatureWithTypeParameters<T>
>T : T
2014-08-15 23:33:16 +02:00
/** This comment should appear for foo*/
new (a: T): T;
>a : T
>T : T
>T : T
2014-08-15 23:33:16 +02:00
}
interface IGlobalConstructSignatureWithOwnTypeParametes {
>IGlobalConstructSignatureWithOwnTypeParametes : IGlobalConstructSignatureWithOwnTypeParametes
2014-08-15 23:33:16 +02:00
new <T extends IGlobalConstructSignature>(a: T): T;
>T : T
>IGlobalConstructSignature : IGlobalConstructSignature
>a : T
>T : T
>T : T
2014-08-15 23:33:16 +02:00
}