You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am using Listr as a way of pipelining, in which each task can send the resolved result to the next one.
The way I am doing it at the moment I assign a variable to context and keep changing it or assign different params, but, it would be much stronger if the returned value is used to be injected to the following task, as it will be very readable and defensive from code perspective.
newListr([{title: 'task 1',task: ()=>{returnPromise.resolve('pass to next task'),},{title: 'task 2',task: (context,task,result?)=>{const resultFromPreviousTask =???
returnPromise.resolve();},}]).run()
We can either add special value to context (which will have some concerns) or we can return a new param to the callback (which will be weird to be the 3rd param).
The text was updated successfully, but these errors were encountered:
Hello,
I am using Listr as a way of pipelining, in which each task can send the resolved result to the next one.
The way I am doing it at the moment I assign a variable to context and keep changing it or assign different params, but, it would be much stronger if the returned value is used to be injected to the following task, as it will be very readable and defensive from code perspective.
We can either add special value to context (which will have some concerns) or we can return a new param to the callback (which will be weird to be the 3rd param).
The text was updated successfully, but these errors were encountered: