Skip to content

Commit bda2772

Browse files
simPodWyriHaximus
andauthored
Update src/PromiseInterface.php
Co-authored-by: Cees-Jan Kiewiet <[email protected]>
1 parent d57bbd6 commit bda2772

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/PromiseInterface.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ interface PromiseInterface
2929
* 2. `$onFulfilled` and `$onRejected` will never be called more
3030
* than once.
3131
*
32-
* @psalm-template TResolved
33-
*
34-
* @param callable(T):(PromiseInterface<TResolved>|TResolved)|null $onFulfilled
35-
* @param callable(mixed):(PromiseInterface|mixed)|null $onRejected
36-
*
37-
* @return PromiseInterface<TResolved>
32+
* @template TReturn of mixed
33+
*
34+
* @param callable(T): TReturn $callable
35+
*
36+
* @return (TReturn is PromiseInterface ? TReturn : PromiseInterface<TReturn>)
3837
*/
3938
public function then(?callable $onFulfilled = null, ?callable $onRejected = null): PromiseInterface;
4039

0 commit comments

Comments
 (0)