is-any-type
Version:
is-any-type simple functionality alternative to check data type references such as typeof and instanceof
30 lines (29 loc) • 1.03 kB
TypeScript
/// <reference types="node" />
import { Compare } from '../compare';
export declare class Type extends Compare {
protected isArrayCheck: string;
protected isBufferCheck: string;
protected isPromiseCheck: string;
protected isFunctionCheck: string;
protected isObjectCheck: string;
protected isNullCheck: string;
protected isUndefinedCheck: string;
protected isStringCheck: string;
protected isNumberCheck: string;
protected isBooleanCheck: string;
protected isTypeData: string[];
protected isGroup: any;
protected isMatch: number;
protected isResult: string;
constructor();
isArray(data: any[]): boolean;
isBuffer(data: Buffer): boolean;
isPromise(data: Promise<any>): boolean;
isFunction(data: Function): boolean;
isObject(data: Record<string, any>): boolean;
isNull(data: null): boolean;
isUndefined(data: undefined): boolean;
isString(data: string): boolean;
isNumber(data: number): boolean;
isBoolean(data: boolean): boolean;
}