TypeScript/tests/baselines/reference/declFileCallSignatures.types
2014-08-15 14:37:48 -07:00

118 lines
2.8 KiB
Plaintext

=== tests/cases/compiler/declFileCallSignatures_0.ts ===
export interface ICallSignature {
>ICallSignature : ICallSignature
/** This comment should appear for foo*/
(): string;
}
export interface ICallSignatureWithParameters {
>ICallSignatureWithParameters : ICallSignatureWithParameters
/** This is comment for function signature*/
(/** this is comment about a*/a: string,
>a : string
/** this is comment for b*/
b: number): void;
>b : number
}
export interface ICallSignatureWithRestParameters {
>ICallSignatureWithRestParameters : ICallSignatureWithRestParameters
(a: string, ...rests: string[]): string;
>a : string
>rests : string[]
}
export interface ICallSignatureWithOverloads {
>ICallSignatureWithOverloads : ICallSignatureWithOverloads
(a: string): string;
>a : string
(a: number): number;
>a : number
}
export interface ICallSignatureWithTypeParameters<T> {
>ICallSignatureWithTypeParameters : ICallSignatureWithTypeParameters<T>
>T : T
/** This comment should appear for foo*/
(a: T): string;
>a : T
>T : T
}
export interface ICallSignatureWithOwnTypeParametes {
>ICallSignatureWithOwnTypeParametes : ICallSignatureWithOwnTypeParametes
<T extends ICallSignature>(a: T): string;
>T : T
>ICallSignature : ICallSignature
>a : T
>T : T
}
=== tests/cases/compiler/declFileCallSignatures_1.ts ===
interface IGlobalCallSignature {
>IGlobalCallSignature : IGlobalCallSignature
/** This comment should appear for foo*/
(): string;
}
interface IGlobalCallSignatureWithParameters {
>IGlobalCallSignatureWithParameters : IGlobalCallSignatureWithParameters
/** This is comment for function signature*/
(/** this is comment about a*/a: string,
>a : string
/** this is comment for b*/
b: number): void;
>b : number
}
interface IGlobalCallSignatureWithRestParameters {
>IGlobalCallSignatureWithRestParameters : IGlobalCallSignatureWithRestParameters
(a: string, ...rests: string[]): string;
>a : string
>rests : string[]
}
interface IGlobalCallSignatureWithOverloads {
>IGlobalCallSignatureWithOverloads : IGlobalCallSignatureWithOverloads
(a: string): string;
>a : string
(a: number): number;
>a : number
}
interface IGlobalCallSignatureWithTypeParameters<T> {
>IGlobalCallSignatureWithTypeParameters : IGlobalCallSignatureWithTypeParameters<T>
>T : T
/** This comment should appear for foo*/
(a: T): string;
>a : T
>T : T
}
interface IGlobalCallSignatureWithOwnTypeParametes {
>IGlobalCallSignatureWithOwnTypeParametes : IGlobalCallSignatureWithOwnTypeParametes
<T extends IGlobalCallSignature>(a: T): string;
>T : T
>IGlobalCallSignature : IGlobalCallSignature
>a : T
>T : T
}