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

30 lines
486 B
JavaScript

//// [assignmentCompatInterfaceWithStringIndexSignature.ts]
interface IHandler {
(e): boolean;
}
interface IHandlerMap {
[type: string]: IHandler;
}
class Foo {
public Boz(): void { }
}
function Biz(map: IHandlerMap) { }
Biz(new Foo());
//// [assignmentCompatInterfaceWithStringIndexSignature.js]
var Foo = (function () {
function Foo() {
}
Foo.prototype.Boz = function () {
};
return Foo;
})();
function Biz(map) {
}
Biz(new Foo());