UNPKG

predictype

Version:

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

18 lines (17 loc) 747 B
import { ObjectInstanceRelationOper } from '../../enums/objects.js'; /** * Checks instance or prototype relation between two values using the specified operation. * * @param source The value to check. * @param oper The relation operation to perform (e.g. 'instance_of', 'prototype_of'). * @param target The target to compare against. * @returns True if the relation check is valid according to the operator, otherwise false. * * @throws {Error} If the operation is not recognized. * * @remarks * Supported Operators: * - **INSTANCE_OF**: value instanceof target * - **PROTOTYPE_OF**: value is prototype of target */ export declare function objectInstanceRelation(source: any, oper: ObjectInstanceRelationOper, target: any): boolean;