fix(core): allow async functions in effects by pkozlowski-opensource · Pull Request #49783 · angular/angular

jessicajaniuk

@pkozlowski-opensource

This change makes is possible to use async functions
(ones returning a promise) as effect run functions.

To make it possible, the signature of the effect function
changed: effect cleanup function is registered now
(using a dedicated callback passed to the effect creation)
instead of being returned from the effect function.

AndrewKushnir pushed a commit that referenced this pull request

Apr 11, 2023
This change makes is possible to use async functions
(ones returning a promise) as effect run functions.

To make it possible, the signature of the effect function
changed: effect cleanup function is registered now
(using a dedicated callback passed to the effect creation)
instead of being returned from the effect function.

PR Close #49783