File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Timer\timeout(…);
47
47
48
48
### timeout()
49
49
50
- The ` timeout(PromiseInterface<mixed > $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed > ` function can be used to
50
+ The ` timeout(PromiseInterface<T > $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<T > ` function can be used to
51
51
cancel operations that take * too long* .
52
52
53
53
You need to pass in an input ` $promise ` that represents a pending operation
@@ -239,7 +239,7 @@ $timer->cancel();
239
239
240
240
> Deprecated since v1.8.0, see [ ` sleep() ` ] ( #sleep ) instead.
241
241
242
- The ` reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void > ` function can be used to
242
+ The ` reject(float $time, ?LoopInterface $loop = null): PromiseInterface<never > ` function can be used to
243
243
create a new promise which rejects in ` $time ` seconds with a ` TimeoutException ` .
244
244
245
245
``` php
Original file line number Diff line number Diff line change 129
129
* For more details on the promise primitives, please refer to the
130
130
* [Promise documentation](https://github.com/reactphp/promise#functions).
131
131
*
132
- * @param PromiseInterface<mixed> $promise
132
+ * @template T
133
+ * @param PromiseInterface<T> $promise
133
134
* @param float $time
134
135
* @param ?LoopInterface $loop
135
- * @return PromiseInterface<mixed >
136
+ * @return PromiseInterface<T >
136
137
*/
137
138
function timeout (PromiseInterface $ promise , $ time , LoopInterface $ loop = null )
138
139
{
@@ -318,7 +319,7 @@ function resolve($time, LoopInterface $loop = null)
318
319
*
319
320
* @param float $time
320
321
* @param LoopInterface $loop
321
- * @return PromiseInterface<void >
322
+ * @return PromiseInterface<never >
322
323
* @deprecated 1.8.0 See `sleep()` instead
323
324
* @see sleep()
324
325
*/
You can’t perform that action at this time.
0 commit comments