Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
25 lines
631 B
Plaintext
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;
|