feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741)
This commit is contained in:
@@ -142,11 +142,11 @@ function process<Def extends Definition>(def: Def, event: Event<Def>, options: {
|
||||
if (options?.publish) {
|
||||
const result = convertEvent(def.type, event.data)
|
||||
if (result instanceof Promise) {
|
||||
result.then((data) => {
|
||||
ProjectBus.publish({ type: def.type, properties: def.schema }, data)
|
||||
void result.then((data) => {
|
||||
void ProjectBus.publish({ type: def.type, properties: def.schema }, data)
|
||||
})
|
||||
} else {
|
||||
ProjectBus.publish({ type: def.type, properties: def.schema }, result)
|
||||
void ProjectBus.publish({ type: def.type, properties: def.schema }, result)
|
||||
}
|
||||
|
||||
GlobalBus.emit("event", {
|
||||
|
||||
Reference in New Issue
Block a user