66 lines
1.4 KiB
Text
66 lines
1.4 KiB
Text
=== tests/cases/compiler/declFileIndexSignatures_0.ts ===
|
|
|
|
export interface IStringIndexSignature {
|
|
>IStringIndexSignature : IStringIndexSignature
|
|
|
|
[s: string]: string;
|
|
>s : string
|
|
}
|
|
export interface INumberIndexSignature {
|
|
>INumberIndexSignature : INumberIndexSignature
|
|
|
|
[n: number]: number;
|
|
>n : number
|
|
}
|
|
|
|
export interface IBothIndexSignature {
|
|
>IBothIndexSignature : IBothIndexSignature
|
|
|
|
[s: string]: any;
|
|
>s : string
|
|
|
|
[n: number]: number;
|
|
>n : number
|
|
}
|
|
|
|
export interface IIndexSignatureWithTypeParameter<T> {
|
|
>IIndexSignatureWithTypeParameter : IIndexSignatureWithTypeParameter<T>
|
|
>T : T
|
|
|
|
[a: string]: T;
|
|
>a : string
|
|
>T : T
|
|
}
|
|
|
|
=== tests/cases/compiler/declFileIndexSignatures_1.ts ===
|
|
interface IGlobalStringIndexSignature {
|
|
>IGlobalStringIndexSignature : IGlobalStringIndexSignature
|
|
|
|
[s: string]: string;
|
|
>s : string
|
|
}
|
|
interface IGlobalNumberIndexSignature {
|
|
>IGlobalNumberIndexSignature : IGlobalNumberIndexSignature
|
|
|
|
[n: number]: number;
|
|
>n : number
|
|
}
|
|
|
|
interface IGlobalBothIndexSignature {
|
|
>IGlobalBothIndexSignature : IGlobalBothIndexSignature
|
|
|
|
[s: string]: any;
|
|
>s : string
|
|
|
|
[n: number]: number;
|
|
>n : number
|
|
}
|
|
|
|
interface IGlobalIndexSignatureWithTypeParameter<T> {
|
|
>IGlobalIndexSignatureWithTypeParameter : IGlobalIndexSignatureWithTypeParameter<T>
|
|
>T : T
|
|
|
|
[a: string]: T;
|
|
>a : string
|
|
>T : T
|
|
}
|