我安装了@types/prismjs
但我有这个问题在node_modules/@types/prismjs/index.d.ts(316,10): error TS2304: Cannot find name 'Required'
.
角
配置.ts
{ "compileOnSave": false, "compilerOptions":
{ "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true,
"declaration": false, "module": "es2015", "moduleResolution": "node",
"emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2017", "dom" ] } } }
tsconfig.json.
将"es2015.symbol"
添加到 lib 或使用 es2015。