Files
SnowLuma/.pnpm-store/v11/files/cd/763e89efcc0887c3db139ba1610e3bd00cc3b72cd029a5473973f1f923e788974ace9a3f4351ceed9720156b6782857e0032b1731cdc62f60bda880bf9ed50
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

25 lines
631 B
Plaintext

/**
* Check if the value is an Error object
*
* 校验是否是错误对象
*
* @example
* ```js
* import { isError } from 'is-what-type';
*
* isError(new Error()); // true
* isError(new TypeError()); // true
* isError({}); // false
* isError({ name: 'CustomError' }); // true
* isError({ name: 'NotAnError' }); // false
* isError(null); // false
* isError(undefined); // false
* isError('string'); // false
* isError(123); // false
* ```
*
* @param value - The value to check
* @returns `true` if the value is an Error object, else `false`
*/
export declare function isError(value: unknown): value is Error;