Documentation
    Preparing search index...

    Class Item<Transformer, Depth, Variant, Fallback>

    Represents a transformer created for a source item.

    Type Parameters

    • Transformer extends Record<string, any>
    • Depth extends number
    • Variant extends string
    • Fallback
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Type Parameters

      • Transformer extends Record<string, any>
      • Depth extends number
      • Variant extends string
      • Fallback

      Parameters

      • transformerData: any
      • transformer: new (...args: any[]) => Transformer
      • maxDepth: Depth
      • variant: Variant
      • debuggingError: RuntimeException
      • allowNullable: boolean = true

      Returns Item<Transformer, Depth, Variant, Fallback>

    Properties

    $type: "item" = 'item'

    Methods

    • Transforms the resources to plain a JSON object. The maxDepth and depth properties can be specified when transforming the collection as a relationship.

      Parameters

      • container: ContainerResolver<any>
      • depth: number
      • OptionalmaxDepth: number

      Returns Fallback | Promise<InferData<Transformer, Variant>>