My problem is quite simple: I want to use the Error constructor that takes a message and an options object. Even though my tsconfig.json file states that "target": "es2020", VS Code's Intellisense only shows one constructor for Error (the one that only takes a message). Furthermore, when I navigate to the definition, the file that shows up is called lib.es5.d.ts.
If I try to compile, I get the following message:
src/FetchedConfigDataSource.ts:46:37 - error TS2554: Expected 0-1 arguments, but got 2.
46 throw new Error('', { cause: err });
What am I doing incorrectly here? Let me know if I should elaborate on anything.