mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: store w transaction
This commit is contained in:
@@ -82,7 +82,7 @@ export type SignalKeyStore = {
|
||||
|
||||
export type SignalKeyStoreWithTransaction = SignalKeyStore & {
|
||||
isInTransaction: () => boolean
|
||||
transaction(exec: () => Promise<void>): Promise<void>
|
||||
transaction<T>(exec: () => Promise<T>): Promise<T>
|
||||
}
|
||||
|
||||
export type TransactionCapabilityOptions = {
|
||||
@@ -92,7 +92,7 @@ export type TransactionCapabilityOptions = {
|
||||
|
||||
export type SignalAuthState = {
|
||||
creds: SignalCreds
|
||||
keys: SignalKeyStore
|
||||
keys: SignalKeyStore | SignalKeyStoreWithTransaction
|
||||
}
|
||||
|
||||
export type AuthenticationState = {
|
||||
|
||||
Reference in New Issue
Block a user