/** * Abstract interface for storage declaration */ import { IStorageRefOptions } from './IStorageRefOptions'; import { IStorageRef } from './IStorageRef'; import { IRuntimeLoader } from '../core/IRuntimeLoader'; export interface IStorage { /** * Type of storage */ getType(): string; /** * method called after construct which can be used for initialisation purpose * * @param loader */ prepare(loader: IRuntimeLoader): boolean | Promise; /** * create new storage ref for connection to the backend */ create(name: string, options: IStorageRefOptions): IStorageRef | Promise; /** * Shutdown of framework */ shutdown?(): void; }