import Storage from './Storage' type PluginConfig = { } type State = { currentUserId: string, } type Plugin = (config: PluginConfig) => (state: State) => void const LocalStoragePlugin: Plugin = config => ({ currentUserId, }) => { new Storage(currentUserId, 'notes') new Storage(currentUserId, 'folders') }