Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MorphismRegistry

Implements

Index

Constructors

constructor

  • new MorphismRegistry(cache?: Map<any, any> | WeakMap<any, any>): MorphismRegistry
  • Creates an instance of MorphismRegistry.

    Parameters

    • Optional cache: Map<any, any> | WeakMap<any, any>

      Cache implementation to store the mapping functions.

    Returns MorphismRegistry

Accessors

mappers

  • get mappers(): Map<any, any>

Methods

deleteMapper

  • deleteMapper(type: any): any
  • Delete a registered schema associated to a Class

    Parameters

    • type: any

      ES6 Class Type of the ouput Data

    Returns any

exists

  • exists(type: any): any
  • Check if a schema has already been registered for this type

    Parameters

    • type: any

    Returns any

getMapper

map

  • map(type: any, data?: any): any
  • Transform any input in the specified Class

    Parameters

    • type: any

      Class Type of the ouput Data

    • Optional data: any

      Input data to transform

    Returns any

register

setMapper

  • Set a schema for a specific Class Type

    Type parameters

    • Target

    Parameters

    • type: Constructable<Target>

      Class Type of the ouput Data

    • schema: Schema<Target>

      Class Type of the ouput Data

    Returns Mapper<object & object, Target>

Generated using TypeDoc