在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",
本文标题:Property 'fill' does not exist o
本文链接:https://www.haomeiwen.com/subject/upovbktx.html
网友评论