Function embed

  • Parameters

    • type: any

    Returns ((target, field) => void)

      • (target, field): void
      • Parameters

        • target: any
        • field: string

        Returns void

    Description

    Decorator that embed type of property in Item class*

    Example

    import * as collection from '@biorate/collection';
    const { embed } = collection;

    class Nested extends collection.Item {
    @embed(Item.Int) public int: number = null;
    @embed(Item.Float) public float: number = null;
    @embed(Item.String) public string: string = null;
    @embed(Item.Bool) public bool: boolean = null;
    }

Generated using TypeDoc