23 lines
462 B
Plaintext
23 lines
462 B
Plaintext
/**
|
|
* Base Storage class. All storage implementation must inherit this class
|
|
*/
|
|
import { TData } from '../types';
|
|
declare abstract class Storage<I> {
|
|
/**
|
|
* Returns all rows based on ...args
|
|
* @param args
|
|
*/
|
|
abstract get(...args: any[]): Promise<StorageResponse>;
|
|
/**
|
|
* To set all rows
|
|
*
|
|
* @param data
|
|
*/
|
|
set?(data: I | Function): this;
|
|
}
|
|
export interface StorageResponse {
|
|
data: TData;
|
|
total: number;
|
|
}
|
|
export default Storage;
|