TLSyncStorageTransactionCallback

See source code

Callback type for a transaction. The conditional return type ensures that the callback is synchronous.

type TLSyncStorageTransactionCallback<R extends UnknownRecord, T> = (
  txn: TLSyncStorageTransaction<R>,
) => T extends Promise<any>
  ? {
      __error: "Transaction callbacks cannot be async. Use synchronous operations only.";
    }
  : T;
Prev
TLSqliteRow
Next
A11yPriority