Vue3+TypeScript从入门到精通系列之:Accessors are only available when targeting ECMAScript 5 and higher.
编译ts代码:出现如下错误
tsc ./静态.ts
错误提示:Accessors are only available when targeting ECMAScript 5 and higher.
解决方法:错误提示是需要编译到版本ES5或以上
如下所示指定编译到的版本后成功执行代码
tsc ./静态.ts -t es5
node ./静态.js
加油-学习vue3
诸葛-孔明
犬夜叉