Answers for "Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?"

0

Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?

// The standard argument for resolve in your case is unknown, which means that an argument is required;
// If you don't want resolve to be taking any arguments you can explicitly set the generic type of Promise to void;

return new Promise<void>((resolve, reject) => {
  this.red.SET(addr, resp, () => resolve())
})
Posted by: Guest on January-24-2022

Code answers related to "Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language