Library for authoring Zeichen plugins and themes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
416 B

  1. export type State = {
  2. currentUserId: string,
  3. }
  4. export interface StoragePlugin {
  5. save(collectionId: string, item: unknown): Promise<unknown>
  6. load(collectionId: string, itemId?: unknown): Promise<unknown>
  7. remove(collectionId: string, item: unknown): Promise<unknown>
  8. }
  9. type StoragePluginConstructor = new (state: State) => StoragePlugin
  10. export type Plugin<T = {}> = (config?: T) => StoragePluginConstructor