angular-persistence
Version:
A library to handle persistence for Angular 2 applications.
30 lines (29 loc) • 705 B
TypeScript
import { IStorage } from './storage.interface';
import { StorageType } from '../../constants/persistence.storage_type';
/**
* A factory used to retrieve Storage objects
*
* @export
* @class StorageFactory
*
* @author Scott O'Bryan
* @since 1.0
*/
export declare class StorageFactory {
/**
* Returns a new instance of the storage factory.
*
* @static
* @returns {StorageFactory}
*/
static getStorage(): StorageFactory;
private _storages;
/**
* Returns a singleton object of a specified type. Storage
* types are initialized lazily.
*
* @param {StorageType} type
* @returns {IStorage}
*/
of(type: StorageType): IStorage;
}