Interface SyncState<StateType>

interface SyncState<StateType> {
    [INITIAL_STATE]: StateType;
    [STATE]: StateType;
    _addEventListener: ((type, listener, options) => void);
    listeners: EventListenerRegistry;
    options: SyncStateOptions;
    removeAllEventListeners: ((type) => void);
    removeEventListenerById: ((type, id) => void);
    reset: (() => this);
    get initial(): StateType;
    get state(): StateType;
    get stateObj(): {
        state: StateType;
    };
    del(path, update?): any;
    dispatch<Payload>(type, payload?): this;
    extend(prop, method): void;
    get<RTN>(path, defaultValue): any;
    set<VAL>(path, value, update?, forceMerge?): this;
    [key: string]: any;
}

Type Parameters

  • StateType extends object

Implemented by

Indexable

[key: string]: any

Properties

[INITIAL_STATE]: StateType
[STATE]: StateType
_addEventListener: ((type, listener, options) => void)

Type declaration

    • (type, listener, options): void
    • Parameters

      • type: string
      • listener: ((e) => void)
          • (e): void
          • Parameters

            • e: Event

            Returns void

      • options: any

      Returns void

removeAllEventListeners: ((type) => void)

Type declaration

    • (type): void
    • Parameters

      • type: string

      Returns void

removeEventListenerById: ((type, id) => void)

Type declaration

    • (type, id): void
    • Parameters

      • type: string
      • id: string

      Returns void

reset: (() => this)

Type declaration

    • (): this
    • Returns this

Accessors

Methods