mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
494 B
TypeScript
28 lines
494 B
TypeScript
//// [tests/cases/compiler/assignmentCompatInterfaceWithStringIndexSignature.ts] ////
|
|
|
|
//// [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]
|
|
"use strict";
|
|
class Foo {
|
|
Boz() { }
|
|
}
|
|
function Biz(map) { }
|
|
Biz(new Foo());
|