Documentation / @andrew_l/mongo-transaction / OnMongoSessionCommittedResult
Type Alias: OnMongoSessionCommittedResult<T> ​
OnMongoSessionCommittedResult<
T> =object
Type Parameters ​
T ​
T
Properties ​
cancel() ​
cancel: () =>
void
Returns ​
void
promise ​
promise:
Promise<T|undefined>
Executes the provided function upon transaction commit.
Returns T if the transaction is committed and the function completes successfully.
Returns undefined if the transaction is explicitly aborted or ends without committing.
Rejects if the function throws an error.