deno.land / x / replicache@v10.0.0-beta.0 / transaction-closed-error.ts

transaction-closed-error.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/** * This error is thrown when you try to call methods on a closed transaction. */export class TransactionClosedError extends Error { constructor() { super('Transaction is closed'); }}
export type Closed = {closed: boolean};
export function throwIfClosed(tx: Closed): void { if (tx.closed) { throw new TransactionClosedError(); }}
replicache

Version Info

Tagged at
2 years ago