You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When returnPromise is used inside options object, TypeScript gives these errors:
No overload matches this call.
Overload 1 of 2, '(options: OptionsPromise): MinifierPromise', gave the following error.
Argument of type '{ returnPromise: boolean; format: string; }' is not assignable to parameter of type 'OptionsPromise'.
Type '{ returnPromise: boolean; format: string; }' is not assignable to type '{ returnPromise: true; }'.
Types of property 'returnPromise' are incompatible.
Type 'boolean' is not assignable to type 'true'.
Overload 2 of 2, '(options?: OptionsOutput | undefined): MinifierOutput', gave the following error.
Argument of type '{ returnPromise: boolean; format: string; }' is not assignable to parameter of type 'OptionsOutput'.
Type '{ returnPromise: boolean; format: string; }' is not assignable to type '{ returnPromise?: false | undefined; }'.
Types of property 'returnPromise' are incompatible.
Type 'boolean' is not assignable to type 'false'.ts(2769)
How can I fix this type-checking error? (P.S. This is for type-checking in plain .js file)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
index.js
When
returnPromise
is used insideoptions
object,TypeScript
gives these errors:How can I fix this type-checking error? (P.S. This is for type-checking in plain
.js
file)Beta Was this translation helpful? Give feedback.
All reactions