MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / isReference

Method isReference

packages/core/src/entity/Reference.ts:106–108  ·  view source on GitHub ↗

* Checks whether the argument is instance of `Reference` wrapper.

(data: any)

Source from the content-addressed store, hash-verified

104 * Checks whether the argument is instance of `Reference` wrapper.
105 */
106 static isReference<T extends object>(data: any): data is Reference<T> {
107 return data != null && Object.hasOwn(data, referenceSymbol);
108 }
109
110 /**
111 * Wraps the entity in a `Reference` wrapper if the property is defined as `ref`.

Callers 10

isEntityMethod · 0.80
processParamsMethod · 0.80
expandItemMethod · 0.80
autoWireOneToOneMethod · 0.80
wrapReferenceMethod · 0.80
unwrapReferenceMethod · 0.80
findChildrenMethod · 0.80
populateFieldMethod · 0.80
GH7534.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected