refactor: make IPollFunctions emit consistent with trigger emit (#4201)

* refactor: make IPollFunctions emit consistent with trigger emit

* refactor: re-add underscores to poll emits

* chore: update emit override message
This commit is contained in:
Valya
2022-11-08 13:29:20 +00:00
committed by GitHub
parent 77644860c0
commit ebf17e1827
4 changed files with 43 additions and 16 deletions

View File

@@ -160,7 +160,6 @@ export class ActiveWorkflows {
const pollResponse = await workflow.runPoll(node, pollFunctions);
if (pollResponse !== null) {
// eslint-disable-next-line no-underscore-dangle
pollFunctions.__emit(pollResponse);
}
} catch (error) {
@@ -170,8 +169,7 @@ export class ActiveWorkflows {
if (testingTrigger) {
throw error;
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-underscore-dangle
pollFunctions.__emit(error);
pollFunctions.__emitError(error);
}
};