MatchingAnchor <S>
Index
Constructors
Methods
Constructors
constructor
Type parameters
Parameters
actual: AAnchor<S, any>
The anchor that was matched.
optionalschemaTranslator: (synth: any) => S
Reads
actualas the matched schema, when the two differ.
Returns MatchingAnchor<S>
Methods
getActual
The anchor itself, with its properties hidden - read those through MatchingAnchor.getSchemaInstance.
Returns AAnchor<Omit<S, properties> & { properties: Record<never, never> }, any>
getSchemaInstance
The anchor read as the schema you matched on.
Returns S
hasSchemaTranslator
Whether the match went through a schema translation.
Returns boolean
An anchor found by schema, paired with the translation needed to read it as that schema.
AModel.getAnchorsMatchingSchema returns these rather than raw anchors: the anchor you matched may have been declared against a different version of the schema, and this is what keeps that difference out of your module. Read it with
getSchemaInstance().Types