Why does mapping Map entries error when using an arrow function in TypeScrpt?

后端 未结 0 1592
误落风尘
误落风尘 2021-01-12 23:09

The following code works perfectly fine in JavaScript but not in TypeScript:

const myMap = new Map([
  [ \'x\', { a: 1}],
  [ \'y\', { b: 2}]
]);
console.log(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题