Node 18 upgrade improvements
Opened this issue · 1 comments
fregante commented
I just saw a couple node Node 18-related notes in the code. I'll add a couple more:
- Add support for
cause
inTimeoutError
, even if unused locally - Use public fields instead of the constructor (this actually fixes the above issue automatically too)
- Ensure that the type for
TimeoutError
matches these changes, since d.ts file is maintained manually
silverwind commented
For custom errors, the V8-specific Error.captureStackTrace
might be nice for a cleaner stack trace. Call it with ?.
so it does not fail on non-V8.