A wrapper around set to store the map. The map can be an instance of Lazy so that it is computed every time SetAction#act is called.

Example

import { SetAction } from 'apption'
let obj1 = { a: 1, b: 2, c: 3 }, obj2 = { a: 1, b: 2, c: 3 };
const action = new SetAction({ a: [obj1], b: [obj2], c: [obj1] });
action.act(20);
console.log(obj1); // { a: 20, b: 2, c: 20}
console.log(obj2); // { a: 1, b: 20, c: 3}

Hierarchy (view full)

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • map: {
          [key: string | number]: any[];
      }
      • [key: string | number]: any[]

    Returns SetAction

Properties

Accessors

  • get actor(): any
  • The function equivalent of this action.

    Returns any

Methods

  • Parameters

    • value: any
    • Rest ...args: any[]

    Returns void