fix(types): add Error.isError type (#28679)

This commit is contained in:
Kenta Moriuchi 2025-04-01 06:22:31 +09:00 committed by Ryan Dahl
parent 53b44049b1
commit 65b5d300b8

View file

@ -3746,3 +3746,14 @@ interface DataView {
*/
setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void;
}
/**
* @category Platform
* @experimental
*/
interface ErrorConstructor {
/**
* Indicates whether the argument provided is a built-in Error instance or not.
*/
isError(error: unknown): error is Error;
}