-1
我有以下打字稿代码片断:错误TS2345:类型的参数“地图<字符串,布尔>”未屁股ignable到类型的参数“IterableShim <[字符串,布尔]>”
setSelection(selection: Map<String, boolean>) {
this.selection = new Map<String, boolean>(selection);
}
但这给了我以下错误:
error TS2345: Argument of type 'Map' is not ass ignable to parameter of type 'IterableShim<[String, boolean]>'. Property '"es6-shim iterator"' is missing in type 'Map'.
我做错了什么(代码工作虽然)?
我使用与ES6-垫片类型描述(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/es6-shim)分型。
非常感谢,
托比亚斯