google / google/closure-compiler
ES2022 Error option in constructor is not polyfilled
Open
P4
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
In ES2022, Error constructor can receives 2nd argument `option: {cause?: unknown}`
I can see closure compiler's [extern](https://github.com/google/closure-compiler/blob/master/externs/es3.js#L2552-L2561) is updated to reflect this
However, the constructor is not polyfilled
This makes the old browser miss the cause information even if option.cause is provided to constructor
I understand this is tricky to polyfill, as `js.comp.polyfill` is only capable polyfilling something that is missing, where in this case it's extending a existing constructor
Contributor guide
Assessment
This issue has not been assessed yet.