closure-compiler
closure-compiler copied to clipboard
ES2022 Error option in constructor is not polyfilled
In ES2022, Error constructor can receives 2nd argument option: {cause?: unknown}
I can see closure compiler's extern 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
It's not clear how we could polyfill this. It seems like any attempt would be imperfect at best. It doesn't really seem worth doing.
We are willing to review a PR if someone wants to create one.