File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ export const transaction = async <Result = void>(
8484 }
8585
8686 try {
87- return rollback ( )
87+ rollback ( )
88+ return undefined as Result
8889 } catch ( rollbackError ) {
8990 throw NitroSQLiteError . fromError ( rollbackError )
9091 }
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ export interface NitroSQLiteConnection {
88 delete ( ) : void
99 attach ( dbNameToAttach : string , alias : string , location ?: string ) : void
1010 detach ( alias : string ) : void
11- transaction ( fn : ( tx : Transaction ) => Promise < void > | void ) : Promise < void >
11+ transaction < Result = void > (
12+ fn : ( tx : Transaction ) => Promise < Result > ,
13+ ) : Promise < Result >
1214 execute : ExecuteQuery
1315 executeAsync : ExecuteAsyncQuery
1416 executeBatch ( commands : BatchQueryCommand [ ] ) : BatchQueryResult
You can’t perform that action at this time.
0 commit comments