Skip to content

Commit

Permalink
feat(transaction): add afterCommit hook (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Superd22 authored and louy committed May 23, 2019
1 parent 84df168 commit 69b371d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/transaction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export class Transaction {
*/
public rollback(): Promise<void>

/**
* A hook that is run after a transaction is committed
*
* @param fn A callback function that is called with the committed transaction
*/
public afterCommit(fn: () => Promise<void> | void): void

/**
* Possible options for row locking. Used in conjunction with `find` calls:
*
Expand Down

0 comments on commit 69b371d

Please sign in to comment.