feat: add makeCacheableSignalKeyStore util

This commit is contained in:
Adhiraj Singh
2022-09-20 12:16:05 +05:30
parent 28afa96cb9
commit 6735263696
3 changed files with 81 additions and 3 deletions

View File

@@ -69,6 +69,8 @@ type Awaitable<T> = T | Promise<T>
export type SignalKeyStore = {
get<T extends keyof SignalDataTypeMap>(type: T, ids: string[]): Awaitable<{ [id: string]: SignalDataTypeMap[T] }>
set(data: SignalDataSet): Awaitable<void>
/** clear all the data in the store */
clear?(): Awaitable<void>
}
export type SignalKeyStoreWithTransaction = SignalKeyStore & {