如何修复'node_modules/@types/prismjs/index.d.ts中的错误找不到角度名称错误

时间:2019-04-24 10:14:02

标签: angular tsconfig prismjs

我安装了@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" ] } } }

1 个答案:

答案 0 :(得分:0)

"es2015.symbol"添加到tsconfig.json.中的lib中,或使用es2015。