TypeScript/tests/baselines/reference/declFileIndexSignatures.js

70 lines
1.5 KiB
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [tests/cases/compiler/declFileIndexSignatures.ts] ////
//// [declFileIndexSignatures_0.ts]
export interface IStringIndexSignature {
[s: string]: string;
}
export interface INumberIndexSignature {
[n: number]: number;
}
export interface IBothIndexSignature {
[s: string]: any;
[n: number]: number;
}
export interface IIndexSignatureWithTypeParameter<T> {
[a: string]: T;
}
//// [declFileIndexSignatures_1.ts]
interface IGlobalStringIndexSignature {
[s: string]: string;
}
interface IGlobalNumberIndexSignature {
[n: number]: number;
}
interface IGlobalBothIndexSignature {
[s: string]: any;
[n: number]: number;
}
interface IGlobalIndexSignatureWithTypeParameter<T> {
[a: string]: T;
}
//// [declFileIndexSignatures_0.js]
//// [declFileIndexSignatures_1.js]
//// [declFileIndexSignatures_0.d.ts]
export interface IStringIndexSignature {
2014-07-12 01:36:06 +02:00
[s: string]: string;
2014-07-13 01:04:16 +02:00
}
export interface INumberIndexSignature {
2014-07-12 01:36:06 +02:00
[n: number]: number;
2014-07-13 01:04:16 +02:00
}
export interface IBothIndexSignature {
2014-07-12 01:36:06 +02:00
[s: string]: any;
[n: number]: number;
2014-07-13 01:04:16 +02:00
}
export interface IIndexSignatureWithTypeParameter<T> {
2014-07-12 01:36:06 +02:00
[a: string]: T;
2014-07-13 01:04:16 +02:00
}
//// [declFileIndexSignatures_1.d.ts]
interface IGlobalStringIndexSignature {
2014-07-12 01:36:06 +02:00
[s: string]: string;
}
interface IGlobalNumberIndexSignature {
2014-07-12 01:36:06 +02:00
[n: number]: number;
}
interface IGlobalBothIndexSignature {
2014-07-12 01:36:06 +02:00
[s: string]: any;
[n: number]: number;
}
interface IGlobalIndexSignatureWithTypeParameter<T> {
2014-07-12 01:36:06 +02:00
[a: string]: T;
}