TypeScript/tests/baselines/reference/declFileIndexSignatures.js
2015-11-23 14:57:47 -08:00

71 lines
1.5 KiB
TypeScript

//// [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]
"use strict";
//// [declFileIndexSignatures_1.js]
//// [declFileIndexSignatures_0.d.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.d.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;
}