|
- export type State = {
- currentUserId: string,
- }
-
- export interface StoragePlugin {
- save(collectionId: string, item: unknown): Promise<unknown>
- load(collectionId: string, itemId?: unknown): Promise<unknown>
- remove(collectionId: string, item: unknown): Promise<unknown>
- }
-
- type StoragePluginConstructor = new (state: State) => StoragePlugin
-
- export type Plugin<T = {}> = (config?: T) => StoragePluginConstructor
|