Files
NapCatQQ/.pnpm-store/v3/files/c7/1710320dc1dc89e78ad15eb612f511ba9ab232e5962f63967c164d397af33390258d98e66b8319f9c334427441028dd359d33ae06f1f969ff87da46cb3e5fd
TanTan e311ca3275
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
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

24 lines
686 B
Plaintext

/**
* Check if the value is what you want
*
* 校验是否是想要的类型
*
* @example
* ```js
* import { isWhat } from 'is-what-type';
*
* const value: string | number | boolean | null | undefined | symbol | bigint = null;
const whatType = typeof value;
if (isWhat<object>(value, whatType, 'object')) {
Object.keys(value); // Throws TypeError: Cannot convert undefined or null to object
}
* ```
*
* @param value - The value to check
* @param type - The type of the value
* @param comparingType - The type to compare with
* @returns
*/
export declare function isWhat<T = unknown>(value: unknown, type: unknown, comparingType: unknown): value is T;