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

@@ -1874,7 +1874,12 @@ export function getExecutePollFunctions(
return ((workflow: Workflow, node: INode) => {
return {
__emit: (data: INodeExecutionData[][]): void => {
throw new Error('Overwrite NodeExecuteFunctions.getExecutePullFunctions.__emit function!');
throw new Error('Overwrite NodeExecuteFunctions.getExecutePollFunctions.__emit function!');
},
__emitError(error: Error) {
throw new Error(
'Overwrite NodeExecuteFunctions.getExecutePollFunctions.__emitError function!',
);
},
async getCredentials(type: string): Promise<ICredentialDataDecryptedObject> {
return getCredentials(workflow, node, type, additionalData, mode);