async
async copied to clipboard
[4.x] Add template annotations to async and await
These annotations will aid static analyses like PHPStan and Psalm to enhance type-safety for this project and projects depending on it.
This PR builds on the discussion at https://github.com/vimeo/psalm/discussions/7559 Once this PR goes up for review simular PR's will also be opened for v2 and v3 of this package. Depends on: https://github.com/reactphp/promise/pull/227
@clue I assume most of the location related comments also go for the promise counter parts?
+1+1+1
Needed to highlight how much I like this change despite all the nit-picking in this review. Keep it up!
Much appreciated @clue . Updated this PR, and https://github.com/reactphp/promise/pull/227 (and https://github.com/reactphp/promise/pull/228) with related changes.