Libraries
    Preparing search index...

    Class MappingRegistry<TRegistered>

    Type Parameters

    • TRegistered = never
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    _mappers: Map<
        ObjectSchemaBuilder<any, any, any, undefined, false, {}, []>,
        Map<
            ObjectSchemaBuilder<any, any, any, undefined, false, {}, []>,
            SchemaToSchemaMapperResult<any, any>,
        >,
    > = ...

    Methods

    • Gets a mapper function that will map from the fromSchema to the toSchema. Throws an error if no mapper is found for the given schemas pair.

      Type Parameters

      • TFromSchema extends ObjectSchemaBuilder<any, any, any, undefined, false, {}, []>
      • TToSchema extends ObjectSchemaBuilder<any, any, any, undefined, false, {}, []>

      Parameters

      Returns SchemaToSchemaMapperResult<TFromSchema, TToSchema>

      a function that will take a value of the fromSchema type as an argument and return a promise resolving to a value of the toSchema type