How to "chain" handlers? #29
-
AbstractLet us imagine we have A handler which returns specific result Analogue in typescript codehandlerA(data).then(result => handlerB(result)).then(result => handlerC(result)) Real-Life exampleLet us image we have package that lets us use Github Rest Api. There is a handler that lets us to list all organization repositories. We call it and we want to call handler that lets us to create/update file in repository on every repository and so on... QuestionDo I have write code that waits until the first |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Looks like it is possible to link handleB with result's type and handleC to link with result's type that is coming out from handlerB. No need for any awaits. |
Beta Was this translation helpful? Give feedback.
Looks like it is possible to link handleB with result's type and handleC to link with result's type that is coming out from handlerB. No need for any awaits.