google / google/closure-compiler

ES2022 Error option in constructor is not polyfilled

Open
#4,233 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.