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
Narrowing the error type with instaceof doesn't work correctly.
import{retry,RetryError}from'ts-retry-promise';try{awaitretry(()=>Promise.reject('test'));}catch(error: unknown){if(errorinstanceofRetryError){// never get here}// the above doesn't workerror.name// ErrorerrorinstanceofError// trueerrorinstanceofRetryError// false}
Extending built-in Error type with extends ES6 keyword doesn't work correctly when the code is later transformed to ES5.
Recommend to use make-error lib for extending error types.
The text was updated successfully, but these errors were encountered:
Narrowing the error type with
instaceof
doesn't work correctly.Extending built-in
Error
type withextends
ES6 keyword doesn't work correctly when the code is later transformed to ES5.Recommend to use make-error lib for extending error types.
The text was updated successfully, but these errors were encountered: