mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add Error.prototype.cause (#47020)
* Add `Error.prototype.cause` Fixes #47019 * Update test baselines
This commit is contained in:
committed by
GitHub
parent
e46f3baec1
commit
363e3a78f4
@@ -627,7 +627,8 @@ namespace ts {
|
||||
Float64Array: ["at"],
|
||||
BigInt64Array: ["at"],
|
||||
BigUint64Array: ["at"],
|
||||
ObjectConstructor: ["hasOwn"]
|
||||
ObjectConstructor: ["hasOwn"],
|
||||
Error: ["cause"]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
53
src/lib/es2022.error.d.ts
vendored
53
src/lib/es2022.error.d.ts
vendored
@@ -1,8 +1,55 @@
|
||||
interface ErrorOptions {
|
||||
cause?: Error;
|
||||
cause?: Error;
|
||||
}
|
||||
|
||||
interface Error {
|
||||
cause?: Error;
|
||||
}
|
||||
|
||||
interface ErrorConstructor {
|
||||
new(message?: string, options?: ErrorOptions): Error;
|
||||
(message?: string, options?: ErrorOptions): Error;
|
||||
new (message?: string, options?: ErrorOptions): Error;
|
||||
(message?: string, options?: ErrorOptions): Error;
|
||||
}
|
||||
|
||||
interface EvalErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): EvalError;
|
||||
(message?: string, options?: ErrorOptions): EvalError;
|
||||
}
|
||||
|
||||
interface RangeErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): RangeError;
|
||||
(message?: string, options?: ErrorOptions): RangeError;
|
||||
}
|
||||
|
||||
interface ReferenceErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): ReferenceError;
|
||||
(message?: string, options?: ErrorOptions): ReferenceError;
|
||||
}
|
||||
|
||||
interface SyntaxErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): SyntaxError;
|
||||
(message?: string, options?: ErrorOptions): SyntaxError;
|
||||
}
|
||||
|
||||
interface TypeErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): TypeError;
|
||||
(message?: string, options?: ErrorOptions): TypeError;
|
||||
}
|
||||
|
||||
interface URIErrorConstructor {
|
||||
new (message?: string, options?: ErrorOptions): URIError;
|
||||
(message?: string, options?: ErrorOptions): URIError;
|
||||
}
|
||||
|
||||
interface AggregateErrorConstructor {
|
||||
new (
|
||||
errors: Iterable<any>,
|
||||
message?: string,
|
||||
options?: ErrorOptions
|
||||
): AggregateError;
|
||||
(
|
||||
errors: Iterable<any>,
|
||||
message?: string,
|
||||
options?: ErrorOptions
|
||||
): AggregateError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user