@ngx-pwa/local-storage
Version:
Efficient local storage module for Angular: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.
21 lines (20 loc) • 679 B
TypeScript
import { ModuleWithProviders } from '@angular/core';
import { StorageConfig } from './tokens';
/**
* This module does not contain anything, it's only useful to provide options via `.forRoot()`.
*/
export declare class StorageModule {
/**
* Only useful to provide options, otherwise it does nothing.
* **Must be used at initialization, ie. in `AppModule`, and must not be loaded again in another module.**
*
* @example
* NgModule({
* imports: [StorageModule.forRoot({
* LSPrefix: 'custom_',
* })]
* })
* export class AppModule
*/
static forRoot(config: StorageConfig): ModuleWithProviders<StorageModule>;
}