Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JitPropertyConverter

Creates a new JIT compiled function to convert given property schema for certain paths. Paths can be deep paths making it possible to convert patch-like/mongo structure

Note: If fromFormat -> toFormat has no compiler templates registered, the generated function does virtually nothing.

Hierarchy

  • JitPropertyConverter

Index

Constructors

constructor

  • new JitPropertyConverter(fromFormat: string, toFormat: string, classType: ClassType<any>): JitPropertyConverter
  • Parameters

    • fromFormat: string
    • toFormat: string
    • classType: ClassType<any>

    Returns JitPropertyConverter

Properties

Protected cacheJitPropertyMap

cacheJitPropertyMap: WeakMap<PropertyCompilerSchema, any>

Protected cacheJitVirtualPropertyMap

cacheJitVirtualPropertyMap: Map<string, any>

fromFormat

fromFormat: string

Protected schema

schema: ClassSchema<any>

toFormat

toFormat: string

Methods

convert

  • convert(path: string, value: any, parents?: any[]): any
  • Parameters

    • path: string
    • value: any
    • Optional parents: any[]

    Returns any

convertProperty

  • Parameters

    Returns any

Generated using TypeDoc