@practicaloptimism/uniplexer
Version:
A multiplexer for 3rd party service providers and application protocols
18 lines (12 loc) • 483 B
text/typescript
import { CreateItemStore } from '../../../@utility/data-structures/database'
import { rootStore, storeTable } from '../variables'
const createItemStore: CreateItemStore = createItemStoreFunction
async function createItemStoreFunction (storeId: string): Promise<any[]> {
rootStore.setItem(storeId, true)
storeTable[storeId] = rootStore.createInstance({ name: storeId })
// this.storeTable[storeId].clear()
return Promise.resolve([storeId])
}
export {
createItemStore
}