Skip to content

Commit 69b371d

Browse files
Superd22louy
authored andcommitted
feat(transaction): add afterCommit hook (#183)
1 parent 84df168 commit 69b371d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/transaction.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ export class Transaction {
2121
*/
2222
public rollback(): Promise<void>
2323

24+
/**
25+
* A hook that is run after a transaction is committed
26+
*
27+
* @param fn A callback function that is called with the committed transaction
28+
*/
29+
public afterCommit(fn: () => Promise<void> | void): void
30+
2431
/**
2532
* Possible options for row locking. Used in conjunction with `find` calls:
2633
*

0 commit comments

Comments
 (0)