TypeScript/tests/baselines/reference/propertiesAndIndexers.js
2014-07-12 17:30:19 -07:00

74 lines
1.1 KiB
JavaScript

//// [propertiesAndIndexers.ts]
interface X { }
interface Y {
n: number;
}
interface Z {
s: string;
}
interface A {
a: Y;
b: X;
1: Z;
}
interface B extends A {
[n: number]: string;
c: boolean;
3: boolean;
6(): string;
}
interface B {
4: boolean;
5: string;
}
interface C extends A {
[s: string]: number;
c: boolean;
3: boolean;
}
interface D extends B, C {
2: Z;
Infinity: number;
zoo: string;
}
class P {
[n: string]: string
}
class Q extends P {
t: number;
}
var c: {
[n: number]: string;
c: boolean;
3: boolean;
};
//// [propertiesAndIndexers.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var P = (function () {
function P() {
}
return P;
})();
var Q = (function (_super) {
__extends(Q, _super);
function Q() {
_super.apply(this, arguments);
}
return Q;
})(P);
var c;