Requirements
A while back, PR #765 was merged, introducing support for the cause property in ErrorOptions. This was implemented by changing the compilation target from es2015 to es2022. However, this change may cause compilation errors for SDK users who are compiling to a lower target and have skipLibChecks:false.
While the cause functionality is a valuable addition, I'm concerned about the potential impact on runtime support. Is the added functionality worth the potential decrease in compatibility?
I'm wondering if there might be alternative ways to implement this feature without changing the compilation target. For instance, could we manually set the cause property where needed? This approach might be compatible with both older and newer runtimes, and could potentially avoid the issue altogether.
I'm interested in hearing your thoughts, and open to contributing a PR.
Requirements
A while back, PR #765 was merged, introducing support for the
causeproperty inErrorOptions. This was implemented by changing the compilation target fromes2015toes2022. However, this change may cause compilation errors for SDK users who are compiling to a lower target and haveskipLibChecks:false.While the
causefunctionality is a valuable addition, I'm concerned about the potential impact on runtime support. Is the added functionality worth the potential decrease in compatibility?I'm wondering if there might be alternative ways to implement this feature without changing the compilation target. For instance, could we manually set the
causeproperty where needed? This approach might be compatible with both older and newer runtimes, and could potentially avoid the issue altogether.I'm interested in hearing your thoughts, and open to contributing a PR.