Const
Test if a value is an instance of a given object or relation type.
Kind-agnostic counterpart to Obj.instanceOf / Relation.instanceOf — use this when the caller's input type is Type.AnyObj | Type.AnyRelation.
Obj.instanceOf
Relation.instanceOf
Type.AnyObj | Type.AnyRelation
// Caller doesn't know whether `type` is object- or relation-kind.const matches = <T extends Type.AnyObj | Type.AnyRelation>(type: T, value: unknown) => Entity.instanceOf(type, value); Copy
// Caller doesn't know whether `type` is object- or relation-kind.const matches = <T extends Type.AnyObj | Type.AnyRelation>(type: T, value: unknown) => Entity.instanceOf(type, value);
O(1) type-URI comparison with a typename fallback; no schema validation.
Test if a value is an instance of a given object or relation type.
Kind-agnostic counterpart to
Obj.instanceOf/Relation.instanceOf— use this when the caller's input type isType.AnyObj | Type.AnyRelation.