在typescript中:
new Array(9).fill('ab')
但是tsc的时候报错:
Property 'fill' does not exist on type 'any[]'.
我们只需要把tsconfig.json里面的target改成es6就可以了:
"target": "es6",
在typescript中:
new Array(9).fill('ab')
但是tsc的时候报错:
Property 'fill' does not exist on type 'any[]'.
我们只需要把tsconfig.json里面的target改成es6就可以了:
"target": "es6",