1 | import { AnyFunction } from './isFunction.js';
|
2 | export type AnyClass = new (...args: unknown[]) => unknown;
|
3 | /**
|
4 | * Does a generic check to check that the given payload is of a given type. In cases like Number, it
|
5 | * will return true for NaN as NaN is a Number (thanks javascript!); It will, however, differentiate
|
6 | * between object and null
|
7 | *
|
8 | * @throws {TypeError} Will throw type error if type is an invalid type
|
9 | */
|
10 | export declare function isType<T extends AnyFunction | AnyClass>(payload: unknown, type: T): payload is T;
|