UNPKG

predictype

Version:

PredicType is a library of pre-built and tested predicates for TypeScript, covering various data types and operations.

19 lines (18 loc) 703 B
import { ObjectInstanceTypeOper } from '../../enums/objects.js'; /** * Checks the type of an instance using the specified operation. * * @param source The value to check. * @param oper The type operation to perform. * @returns True if the type check is valid according to the operator, otherwise false. * * @throws {Error} If the operation is not recognized. * * @remarks * Supported Operators: * - **INSTANCE_OF_CLASS**: Is a class constructor * - **INSTANCE_OF_CONSTRUCTOR**: Is a constructor function * - **INSTANCE_OF_FUNCTION**: Is a function * - **INSTANCE_OF_OBJECT**: Is an object */ export declare function objectInstanceType(source: any, oper: ObjectInstanceTypeOper): boolean;