TypeScript/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js
2015-02-06 18:45:09 -08:00

28 lines
480 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());