feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741)

This commit is contained in:
Kit Langton
2026-04-15 23:27:32 -04:00
committed by GitHub
parent 343a564183
commit 80f1f1b5b8
103 changed files with 212 additions and 187 deletions

View File

@@ -134,7 +134,7 @@ export namespace Database {
if (err instanceof LocalContext.NotFound) {
const effects: (() => void | Promise<void>)[] = []
const result = ctx.provide({ effects, tx: Client() }, () => callback(Client()))
for (const effect of effects) effect()
for (const effect of effects) void effect()
return result
}
throw err
@@ -146,7 +146,7 @@ export namespace Database {
try {
ctx.use().effects.push(bound)
} catch {
bound()
void bound()
}
}
@@ -165,7 +165,7 @@ export namespace Database {
const effects: (() => void | Promise<void>)[] = []
const txCallback = InstanceState.bind((tx: TxOrDb) => ctx.provide({ tx, effects }, () => callback(tx)))
const result = Client().transaction(txCallback, { behavior: options?.behavior })
for (const effect of effects) effect()
for (const effect of effects) void effect()
return result as NotPromise<T>
}
throw err