You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-7
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ A trivial implementation of timeouts for `Promise`s, built on top of [ReactPHP](
18
18
*[reject()](#reject)
19
19
*[Reject cancellation](#reject-cancellation)
20
20
*[TimeoutException](#timeoutexception)
21
+
*[getTimeout()](#gettimeout)
21
22
*[Install](#install)
22
23
*[Tests](#tests)
23
24
*[License](#license)
@@ -51,8 +52,8 @@ Timer\timeout(…);
51
52
52
53
### timeout()
53
54
54
-
The `timeout(PromiseInterface$promise, $time, LoopInterface $loop = null)` function
55
-
can be used to *cancel* operations that take *too long*.
55
+
The `timeout(PromiseInterface<mixed, Exception|mixed> $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed, TimeoutException|Exception|mixed>` function can be used to
56
+
*cancel* operations that take *too long*.
56
57
You need to pass in an input `$promise` that represents a pending operation and timeout parameters.
57
58
It returns a new `Promise` with the following resolution behavior:
58
59
@@ -284,8 +285,8 @@ For more details on the promise primitives, please refer to the
284
285
285
286
### resolve()
286
287
287
-
The `resolve($time, LoopInterface $loop = null)` function can be used to create a new Promise that
288
-
resolves in `$time` seconds with the `$time` as the fulfillment value.
288
+
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float, RuntimeException>` function can be used to
289
+
create a new Promise that resolves in `$time` seconds with the `$time` as the fulfillment value.
0 commit comments