error TS7009: ‘new’ expression, whose target lacks a construct signature, implicitly has an ‘any’ type.
Broken Code ❌
Fixed Code ✔️
resolve function of a
Promise is not a constructor. You can use the
new keyword only with constructors, so the
new keyword has to be removed in order to fix the code:
Alternatively, you can make use of the constructor: