Skip to main content

MatchingModel <S>

A model found by schema. See MatchingAnchor.

@group

Types

Index

Constructors

constructor

  • MatchingModel<S>(actual: AModel<S, any>, schemaTranslator?: (synth: any) => S): MatchingModel<S>
  • Type parameters

    • S: object

    Parameters

    • actual: AModel<S, any>

      The model that was matched.

    • optionalschemaTranslator: (synth: any) => S

      Reads actual as the matched schema, when the two differ.

      Returns MatchingModel<S>

    Methods

    getActual

    • getActual(): AModel<Record<never, never>, any>

    getSchemaInstance

    • getSchemaInstance(): S
    • The model read as the schema you matched on.


      Returns S

    hasSchemaTranslator

    • hasSchemaTranslator(): boolean
    • Whether the match went through a schema translation.


      Returns boolean