Vue3+TypeScript从入门到精通系列之:Try changing the lib compiler option to es2015 or later
tsc ./泛型接口.ts
tsc编译出现如下报错:
- Property ‘find’ does not exist on type ‘User[]’. Do you need to change your target library? Try changing the ‘lib’ compiler option to ‘es2015’ or later.
解决方法:使用目标库es6
- tsc ./泛型接口.ts -t es6