diff --git a/classes/GenericStorageWrapper.html b/classes/GenericStorageWrapper.html index a2b5a3ec2..8431de70d 100644 --- a/classes/GenericStorageWrapper.html +++ b/classes/GenericStorageWrapper.html @@ -1,7 +1,7 @@ GenericStorageWrapper | Vuex - Long Term Memory

Class GenericStorageWrapper<Outer, Inner>

Builds a custom storage that can be passed to LTM.

Outer - The Vuex state type.

Inner - The storage state type.

-

Type Parameters

Implements

Constructors

Type Parameters

Implements

Constructors

Methods

Constructors

Methods

+

Constructors

Methods

diff --git a/classes/LTM.html b/classes/LTM.html index 6c2da5f3a..4fcdfdc71 100644 --- a/classes/LTM.html +++ b/classes/LTM.html @@ -1,8 +1,8 @@ LTM | Vuex - Long Term Memory

Long Term Memory main class.

S - Vuex state type.

-

Type Parameters

  • S

Constructors

Type Parameters

  • S

Constructors

Properties

Accessors

Constructors

Properties

ready: Promise<void>

Resolves when the state has been restored or no persisted state was found.

-

Accessors

  • get plugin(): Plugin<S>
  • Vuex plugin (i.e. new Vuex.Store({ plugins: [ltm.plugin] })).

    -

    Returns Plugin<S>

+

Constructors

Properties

ready: Promise<void>

Resolves when the state has been restored or no persisted state was found.

+

Accessors

  • get plugin(): Plugin<S>
  • Vuex plugin (i.e. new Vuex.Store({ plugins: [ltm.plugin] })).

    +

    Returns Plugin<S>

diff --git a/functions/chromeLocalStorage.html b/functions/chromeLocalStorage.html index e45c9acdf..69ad58665 100644 --- a/functions/chromeLocalStorage.html +++ b/functions/chromeLocalStorage.html @@ -4,4 +4,4 @@
  • OptionaltoOuter: ToOuter<Outer, Inner>

    Custom conversion from storage object to state object (default is pass through).

  • Returns GenericStorageWrapper<Outer, Inner>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/chromeStorageWrapper.html b/functions/chromeStorageWrapper.html index 352a6fe00..1ba775888 100644 --- a/functions/chromeStorageWrapper.html +++ b/functions/chromeStorageWrapper.html @@ -5,4 +5,4 @@
  • toOuter: ToOuter<Outer, Inner> = ...

    Custom conversion from storage object to state object (default is pass through).

  • Returns GenericStorageWrapper<Outer, Inner>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/chromeSyncStorage.html b/functions/chromeSyncStorage.html index bcdb6967a..9135b0788 100644 --- a/functions/chromeSyncStorage.html +++ b/functions/chromeSyncStorage.html @@ -4,4 +4,4 @@
  • OptionaltoOuter: ToOuter<Outer, Inner>

    Custom conversion from storage object to state object (default is pass through).

  • Returns GenericStorageWrapper<Outer, Inner>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/configurableDeepMerge.html b/functions/configurableDeepMerge.html index 3211092a4..7c5c2f922 100644 --- a/functions/configurableDeepMerge.html +++ b/functions/configurableDeepMerge.html @@ -1,4 +1,4 @@ configurableDeepMerge | Vuex - Long Term Memory

    Function configurableDeepMerge

    • Builds merger that deep merges the states using deepmerge library with custom options.

      Type Parameters

      • S

      Parameters

      • options: Options

        Options to be passed to the library.

      Returns Merger<S>

      Merger that can be passed to LTM.

      -
    +
    diff --git a/functions/deepMerge.html b/functions/deepMerge.html index ddaf877d1..f081601d2 100644 --- a/functions/deepMerge.html +++ b/functions/deepMerge.html @@ -3,4 +3,4 @@
  • previous: S

    State present in Vuex (probably defaults).

  • Returns S

    State that will be put into Vuex.

    See configurableDeepMerge for customizations.

    -
    +
    diff --git a/functions/dummyFilter.html b/functions/dummyFilter.html index 3550dbf94..f8fdcfa8d 100644 --- a/functions/dummyFilter.html +++ b/functions/dummyFilter.html @@ -1,3 +1,3 @@ dummyFilter | Vuex - Long Term Memory
    • Persists everything

      Returns boolean

      Always true.

      -
    +
    diff --git a/functions/executeWithDelay.html b/functions/executeWithDelay.html index 1e4c06e9d..4b7632244 100644 --- a/functions/executeWithDelay.html +++ b/functions/executeWithDelay.html @@ -1,4 +1,4 @@ executeWithDelay | Vuex - Long Term Memory
    +
    diff --git a/functions/inMemoryStorage.html b/functions/inMemoryStorage.html index fe6f3163c..1964d1a7d 100644 --- a/functions/inMemoryStorage.html +++ b/functions/inMemoryStorage.html @@ -1,4 +1,4 @@ inMemoryStorage | Vuex - Long Term Memory
    +
    diff --git a/functions/localForage-1.html b/functions/localForage-1.html index 33687ab4f..9451d25c6 100644 --- a/functions/localForage-1.html +++ b/functions/localForage-1.html @@ -5,4 +5,4 @@
  • OptionaltoOuter: ToOuter<Outer, Inner>

    Custom conversion from storage object to state object (default is pass through).

  • Returns GenericStorageWrapper<Outer, Inner>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/localForageWrapper.html b/functions/localForageWrapper.html index e14a5a408..73f1978d4 100644 --- a/functions/localForageWrapper.html +++ b/functions/localForageWrapper.html @@ -5,4 +5,4 @@
  • toOuter: ToOuter<Outer, Inner> = ...

    Custom conversion from storage object to state object (default is pass through).

  • Returns GenericStorageWrapper<Outer, Inner>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/localStorage.html b/functions/localStorage.html index 167a0b546..f28354526 100644 --- a/functions/localStorage.html +++ b/functions/localStorage.html @@ -3,4 +3,4 @@
  • OptionaltoInner: ToInner<Outer, string>

    Custom conversion from state object to string (default is JSON.stringify).

  • OptionaltoOuter: ToOuter<Outer, string>

    Custom conversion from string to state object (default is JSON.parse).

  • Returns GenericStorageWrapper<Outer, string>

    Outer - The Vuex state type.

    -
    +
    diff --git a/functions/localStorageWrapper.html b/functions/localStorageWrapper.html index bcc775b3a..b340a8e0b 100644 --- a/functions/localStorageWrapper.html +++ b/functions/localStorageWrapper.html @@ -4,4 +4,4 @@
  • toInner: ToInner<Outer, string> = ...

    Custom conversion from state object to string (default is JSON.stringify).

  • toOuter: ToOuter<Outer, string> = ...

    Custom conversion from string to state object (default is JSON.parse).

  • Returns GenericStorageWrapper<Outer, string>

    Outer - The Vuex state type.

    -
    +
    diff --git a/functions/mutationFilter.html b/functions/mutationFilter.html index 40ab387b7..3d313fe40 100644 --- a/functions/mutationFilter.html +++ b/functions/mutationFilter.html @@ -1,3 +1,3 @@ mutationFilter | Vuex - Long Term Memory
    • Builds a filter that filters mutations by given types.

      Parameters

      • mutations: (string | RegExp)[]

        Mutation types that should trigger persisting.

        -

      Returns Filter

    +

    Returns Filter

    diff --git a/functions/pickModules.html b/functions/pickModules.html index 949da6bfd..73337aa52 100644 --- a/functions/pickModules.html +++ b/functions/pickModules.html @@ -1,3 +1,3 @@ pickModules | Vuex - Long Term Memory
    • Saves only select modules.

      Type Parameters

      • S

      Parameters

      • moduleNames: string[]

        Names (as they appear in state object) of modules to be persisted.

        -

      Returns Reducer<S>

    +

    Returns Reducer<S>

    diff --git a/functions/replace.html b/functions/replace.html index b8dcc357c..330d6f189 100644 --- a/functions/replace.html +++ b/functions/replace.html @@ -2,4 +2,4 @@

    Type Parameters

    Parameters

    Returns S

    State that will be put into Vuex.

    -
  • Type Parameters

    Parameters

    Returns S

  • +
  • Type Parameters

    Parameters

    Returns S

  • diff --git a/functions/saveAll.html b/functions/saveAll.html index 801948d56..a2f3438b1 100644 --- a/functions/saveAll.html +++ b/functions/saveAll.html @@ -1,2 +1,2 @@ saveAll | Vuex - Long Term Memory
    +

    Type Parameters

    Parameters

    Returns S

    diff --git a/functions/sessionStorage.html b/functions/sessionStorage.html index 928aad49b..9ce9b7eeb 100644 --- a/functions/sessionStorage.html +++ b/functions/sessionStorage.html @@ -4,4 +4,4 @@
  • OptionaltoOuter: ToOuter<Outer, string>

    Custom conversion from string to state object (default is JSON.parse).

  • Returns GenericStorageWrapper<Outer, string>

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/functions/shallowMerge.html b/functions/shallowMerge.html index 5547e9a6d..4fccf7460 100644 --- a/functions/shallowMerge.html +++ b/functions/shallowMerge.html @@ -2,4 +2,4 @@

    Type Parameters

    Parameters

    Returns S

    State that will be put into Vuex.

    -
    +
    diff --git a/functions/simplyExecute.html b/functions/simplyExecute.html index 49ff07d34..8e29c3e90 100644 --- a/functions/simplyExecute.html +++ b/functions/simplyExecute.html @@ -1,2 +1,2 @@ simplyExecute | Vuex - Long Term Memory

    Persists the state immediatelly.

    -
    • Parameters

      • func: (() => void)
          • (): void
          • Returns void

      Returns void

    +
    diff --git a/interfaces/AsyncStorage.html b/interfaces/AsyncStorage.html index f73127427..ae095f3cf 100644 --- a/interfaces/AsyncStorage.html +++ b/interfaces/AsyncStorage.html @@ -1,6 +1,6 @@ AsyncStorage | Vuex - Long Term Memory

    Interface AsyncStorage<T>

    Storage interface that can be passed to LTM.

    T - The storage state type.

    Valid storage can also be built using GenericStorageWrapper.

    -
    interface AsyncStorage<T> {
        load(): Promise<null | T>;
        save(obj: T): Promise<void>;
    }

    Type Parameters

    • T

    Implemented by

    Methods

    interface AsyncStorage<T> {
        load(): Promise<null | T>;
        save(obj: T): Promise<void>;
    }

    Type Parameters

    • T

    Implemented by

    Methods

    Methods

    +

    Methods

    diff --git a/interfaces/ChromeStorage.html b/interfaces/ChromeStorage.html index c0bcff9b4..459b055bc 100644 --- a/interfaces/ChromeStorage.html +++ b/interfaces/ChromeStorage.html @@ -1,3 +1,3 @@ -ChromeStorage | Vuex - Long Term Memory

    Interface ChromeStorage<T>

    interface ChromeStorage<T> {
        get(key: string[], callback: ((result: StorageItems<T>) => void)): void;
        set(data: StorageItems<T>, callback: (() => void)): void;
    }

    Type Parameters

    • T

    Methods

    get +ChromeStorage | Vuex - Long Term Memory

    Interface ChromeStorage<T>

    interface ChromeStorage<T> {
        get(key: string[], callback: ((result: StorageItems<T>) => void)): void;
        set(data: StorageItems<T>, callback: (() => void)): void;
    }

    Type Parameters

    • T

    Methods

    Methods

    +

    Methods

    diff --git a/interfaces/LTMConfig.html b/interfaces/LTMConfig.html index 717d1a69e..5d0fa3236 100644 --- a/interfaces/LTMConfig.html +++ b/interfaces/LTMConfig.html @@ -1,6 +1,6 @@ -LTMConfig | Vuex - Long Term Memory

    Interface LTMConfig<S>

    interface LTMConfig<S> {
        execute: Executor;
        filter: Filter;
        merge: Merger<S>;
        reduce: Reducer<S>;
        storage: AsyncStorage<Partial<S>>;
    }

    Type Parameters

    • S

    Properties

    execute +LTMConfig | Vuex - Long Term Memory

    Interface LTMConfig<S>

    interface LTMConfig<S> {
        execute: Executor;
        filter: Filter;
        merge: Merger<S>;
        reduce: Reducer<S>;
        storage: AsyncStorage<Partial<S>>;
    }

    Type Parameters

    • S

    Properties

    execute: Executor
    filter: Filter
    merge: Merger<S>
    reduce: Reducer<S>
    storage: AsyncStorage<Partial<S>>
    +

    Properties

    execute: Executor
    filter: Filter
    merge: Merger<S>
    reduce: Reducer<S>
    storage: AsyncStorage<Partial<S>>
    diff --git a/interfaces/LocalForage.html b/interfaces/LocalForage.html index d32035223..05698ad62 100644 --- a/interfaces/LocalForage.html +++ b/interfaces/LocalForage.html @@ -1,3 +1,3 @@ -LocalForage | Vuex - Long Term Memory

    Interface LocalForage<T>

    interface LocalForage<T> {
        getItem(key: string): Promise<T>;
        setItem(key: string, data: T): Promise<void>;
    }

    Type Parameters

    • T

    Methods

    getItem +LocalForage | Vuex - Long Term Memory

    Interface LocalForage<T>

    interface LocalForage<T> {
        getItem(key: string): Promise<T>;
        setItem(key: string, data: T): Promise<void>;
    }

    Type Parameters

    • T

    Methods

    Methods

    +

    Methods

    diff --git a/interfaces/StorageItems.html b/interfaces/StorageItems.html index ef79aaa8c..35b49badb 100644 --- a/interfaces/StorageItems.html +++ b/interfaces/StorageItems.html @@ -1 +1 @@ -StorageItems | Vuex - Long Term Memory

    Interface StorageItems<T>

    Type Parameters

    • T

    Indexable

    • [key: string]: T
    +StorageItems | Vuex - Long Term Memory

    Interface StorageItems<T>

    Type Parameters

    • T

    Indexable

    • [key: string]: T
    diff --git a/interfaces/StringStorage.html b/interfaces/StringStorage.html index 8a4b9acd2..eace12b7d 100644 --- a/interfaces/StringStorage.html +++ b/interfaces/StringStorage.html @@ -1,4 +1,4 @@ StringStorage | Vuex - Long Term Memory

    Required subset of localStorage API by localStorageWrapper.

    -
    interface StringStorage {
        getItem(key: string): null | string;
        setItem(key: string, data: string): void;
    }

    Methods

    interface StringStorage {
        getItem(key: string): null | string;
        setItem(key: string, data: string): void;
    }

    Methods

    Methods

    +

    Methods

    diff --git a/types/Executor.html b/types/Executor.html index 1b741fd4a..5d15b346d 100644 --- a/types/Executor.html +++ b/types/Executor.html @@ -1,3 +1,3 @@ Executor | Vuex - Long Term Memory
    Executor: ((func: (() => void)) => void)

    Manages execution of passed functions (e.g. avoiding bursts by skipping some).

    Type declaration

      • (func): void
      • Parameters

        • func: (() => void)

          Function to be executed (may be thrown away and never executed).

          -
            • (): void
            • Returns void

        Returns void

    +

    Returns void

    diff --git a/types/Filter.html b/types/Filter.html index bf9933a0a..b51d3aad5 100644 --- a/types/Filter.html +++ b/types/Filter.html @@ -1,4 +1,4 @@ Filter | Vuex - Long Term Memory
    Filter: ((mutation: MutationPayload) => boolean)

    Decides if given mutation should trigger persisting.

    Type declaration

      • (mutation): boolean
      • Parameters

        • mutation: MutationPayload

          The mutation from Vuex.

        Returns boolean

        True to persist, false to ignore.

        -
    +
    diff --git a/types/GetItem.html b/types/GetItem.html index ce6236a0b..e5d2d085a 100644 --- a/types/GetItem.html +++ b/types/GetItem.html @@ -2,4 +2,4 @@

    Type Parameters

    String identifying persisted state (like in localStorage.getItem(key)).

    T - The storage state type.

    The persisted state or null if no state exists in the storage. May return a promise resolving to the forementioned value.

    -
    +
    diff --git a/types/Merger.html b/types/Merger.html index 67003e5a3..5a308159d 100644 --- a/types/Merger.html +++ b/types/Merger.html @@ -2,4 +2,4 @@

    Type Parameters

    Type declaration

    +
    diff --git a/types/Reducer.html b/types/Reducer.html index aaa92c12d..20faa0c64 100644 --- a/types/Reducer.html +++ b/types/Reducer.html @@ -1,4 +1,4 @@ Reducer | Vuex - Long Term Memory

    Type Alias Reducer<S>

    Reducer<S>: ((state: S) => Partial<S>)

    Removes parts of the state that shouldn't be persisted.

    Type Parameters

    • S

    Type declaration

      • (state): Partial<S>
      • Parameters

        • state: S

          The full state from Vuex.

        Returns Partial<S>

        The part of the state that should be persisted.

        -
    +
    diff --git a/types/SetItem.html b/types/SetItem.html index 97ddbcebe..86c4faa40 100644 --- a/types/SetItem.html +++ b/types/SetItem.html @@ -3,4 +3,4 @@

    The state to be persisted.

    T - The storage state type.

    Shouldn't return or resolve returned promise before the state is persisted.

    -
    +
    diff --git a/types/ToInner.html b/types/ToInner.html index a5da92164..46b9e2659 100644 --- a/types/ToInner.html +++ b/types/ToInner.html @@ -3,4 +3,4 @@

    Returns Inner

    The state data in inner format.

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/types/ToOuter.html b/types/ToOuter.html index 366bd41e0..0d10b2a9a 100644 --- a/types/ToOuter.html +++ b/types/ToOuter.html @@ -3,4 +3,4 @@

    Returns Outer | null

    The state data in outer format.

    Outer - The Vuex state type.

    Inner - The storage state type.

    -
    +
    diff --git a/variables/localForageDrivers.html b/variables/localForageDrivers.html index a183b1729..52cca2d76 100644 --- a/variables/localForageDrivers.html +++ b/variables/localForageDrivers.html @@ -1 +1 @@ -localForageDrivers | Vuex - Long Term Memory

    Variable localForageDriversConst

    localForageDrivers: {
        INDEXEDDB: string;
        LOCALSTORAGE: string;
        WEBSQL: string;
    } = ...
    +localForageDrivers | Vuex - Long Term Memory

    Variable localForageDriversConst

    localForageDrivers: {
        INDEXEDDB: string;
        LOCALSTORAGE: string;
        WEBSQL: string;
    } = ...