My issue is straightforward: I am attempting to utilize the Error
constructor that requires a message and an options object. Despite setting my tsconfig.json
file to have
"target": "es2020"
, the Intellisense in VS Code only displays one constructor for Error
(the one that just needs a message). Additionally, when I try to view the definition, the file that pops up is named lib.es5.d.ts
.
Upon compilation, I receive the following error message:
src/FetchedConfigDataSource.ts:46:37 - error TS2554: Expected 0-1 arguments, but got 2.
46 throw new Error('', { cause: err });
Where am I going wrong here? Please advise if more clarification is needed.