IDE
webstorm
报错提示
error TS2693: 'Promise' only refers to a type, but is being used as a value here.
解决方法:
- npm i --save-dev @types/es6-promise
- /node_modules/vue-template-compiler/types/tsconfig.json
{ "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": false, "noImplicitAny": false, "noLib": false, "moduleResolution": "node", "strict": true, "noEmit": true, "lib": [ "ES5", "ES2015", "DOM", "ScriptHost" ] }, "filesGlob": [ "./**/*.ts", "!./node_modules/**/*.ts" ], "files": [ "./main.ts", "./typings/es6-promise/es6-promise.d.ts" ], "compileOnSave": false, "include": [ "**/*.ts" ] }
网友评论