我安装了@types/prismjs
,但是我有这个问题
在node_modules/@types/prismjs/index.d.ts(316,10): error TS2304: Cannot find name 'Required'
中。
角度
config.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" ] } } }
答案 0 :(得分:0)
将"es2015.symbol"
添加到tsconfig.json.
中的lib中,或使用es2015。