1 个回答
declare interface MyObject {
    [key: string]: string | number;
    [index: number]: string | number;
}

P.S. Map 不兼容低版本,可以 polyfill 啊,反正你 TS 都是要编译成 JS,babel polyfill 一下不行?

推荐问题