Monorepo containing core modules of Zeichen.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

19 lignes
370 B

  1. import Storage from './Storage'
  2. type PluginConfig = {
  3. baseUrl: string,
  4. }
  5. type State = {
  6. currentUserId: string,
  7. }
  8. type Plugin = (config: PluginConfig) => (state: State) => void
  9. const RemoteStoragePlugin: Plugin = config => ({
  10. currentUserId,
  11. }) => {
  12. new Storage(currentUserId, config.baseUrl, 'notes')
  13. new Storage(currentUserId, config.baseUrl, 'folders')
  14. }