@ngxs/storage-plugin
Version:
extendable storage plugin for @ngxs/store
31 lines (25 loc) • 1.67 kB
TypeScript
import * as i0 from '@angular/core';
import { InjectionToken, ModuleWithProviders, EnvironmentProviders } from '@angular/core';
import { StorageEngine, NgxsStoragePluginOptions, StorageKey } from '@ngxs/storage-plugin/internals';
export { NgxsStoragePluginOptions, STORAGE_ENGINE, StorageEngine, StorageOption } from '@ngxs/storage-plugin/internals';
import { NgxsPlugin, NgxsNextPluginFn } from '@ngxs/store/plugins';
declare class NgxsStoragePluginModule {
static forRoot(options: NgxsStoragePluginOptions): ModuleWithProviders<NgxsStoragePluginModule>;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsStoragePluginModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsStoragePluginModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsStoragePluginModule>;
}
declare function withNgxsStoragePlugin(options: NgxsStoragePluginOptions): EnvironmentProviders;
declare function withStorageFeature(storageKeys: StorageKey[]): EnvironmentProviders;
declare class NgxsStoragePlugin implements NgxsPlugin {
private _keysManager;
private _options;
private _allStatesPersisted;
handle(state: any, event: any, next: NgxsNextPluginFn): any;
private _hydrateSelectivelyOnUpdate;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsStoragePlugin, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsStoragePlugin>;
}
declare const LOCAL_STORAGE_ENGINE: InjectionToken<StorageEngine | null>;
declare const SESSION_STORAGE_ENGINE: InjectionToken<StorageEngine | null>;
export { LOCAL_STORAGE_ENGINE, NgxsStoragePlugin, NgxsStoragePluginModule, SESSION_STORAGE_ENGINE, withNgxsStoragePlugin, withStorageFeature };