Type Parameters

  • T

Constructors

Properties

Methods

Constructors

  • Represents a single view of a One instance. A view can be described as an object comprising one property each from the different objects that are part of the One object. We can perform actions on a view without explicitly specifying the properties.

    Type Parameters

    • T

    Parameters

    Returns View<T>

    Example

    import { One, View, args } from "deleight/onetomany";
    const one = new One({ a1: [], a2: [1, 2, 3, 4, 5] });

    const view = new View(one, { a1: 'push', a2: 'shift' })
    // push one array and simultaneously shift the other
    // to transfer content...

    view.call({ [args]: one.many.a2 })

Properties

map: IViewMap<T>
one: One<T>

Methods