We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My compilation target is ES2022 and my lib is the default.
ES2022
the default
cause property on the Error object should have type unknown instead of Error.
cause
Error
unknown
The example from MDN:
function makeRSA(p, q) { if (!Number.isInteger(p) || !Number.isInteger(q)) { throw new Error('RSA key generation requires integer inputs.', { cause: { code: 'NonInteger', value: [p, q] }, }); } if (!areCoprime(p, q)) { throw new Error('RSA key generation requires two co-prime integers.', { cause: { code: 'NonCoprime', values: [p, q] }, }) } // rsa algorithm… }
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause#providing_structured_data_as_the_error_cause
The text was updated successfully, but these errors were encountered:
Good news: It is unknown! At least in the nightly version. This issue is a duplicate of #48098 and it has been fixed already in TypeScript 4.9.
Sorry, something went wrong.
Geat!
edit:
... and thanks ofcourse. Sorry for the duplicate, I swear I searched for it 🙂
Geat indeed!
No branches or pull requests
lib Update Request
Configuration Check
My compilation target is
ES2022
and my lib isthe default
.Missing / Incorrect Definition
cause
property on theError
object should have typeunknown
instead ofError
.Sample Code
The example from MDN:
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause#providing_structured_data_as_the_error_cause
The text was updated successfully, but these errors were encountered: