We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d57bbd6 commit bda2772Copy full SHA for bda2772
src/PromiseInterface.php
@@ -29,12 +29,11 @@ interface PromiseInterface
29
* 2. `$onFulfilled` and `$onRejected` will never be called more
30
* than once.
31
*
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>
+ * @template TReturn of mixed
+ *
+ * @param callable(T): TReturn $callable
+ * @return (TReturn is PromiseInterface ? TReturn : PromiseInterface<TReturn>)
38
*/
39
public function then(?callable $onFulfilled = null, ?callable $onRejected = null): PromiseInterface;
40
0 commit comments