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 })
Private
#one
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 theOne
object. We can perform actions on a view without explicitly specifying the properties.