TypeScript resolve error error: TS2304: Cannot find name 'resolve'.

problem description

when using Promise, resolve keeps reporting errors
error TS2304: Cannot find name "resolve".

the environmental background of the problems and what methods you have tried

modified the lib parameter in tsconfig..json, but the problem can not be found and cannot be solved

related codes

/ / Please paste the code text below (do not replace the code with pictures)
tsconfig.json
{
"compilerOptions": {

  "module": "es6",
  "target": "es6",
  "outDir": "./dist",
  "lib": ["dom","es2015"]

},
"include": [

  "./src/**/*"

]
}

clipboard.png

what result do you expect? What is the error message actually seen?


Brother you have two parameters missing in the Promise callback function. The correct parameters should be as follows:

Menu