Skip to content

Commit 647aea4

Browse files
committed
Template params can only have one argument - README
In the previous PR (#63) I missed incorrect usage in the readme, this PR addresses that. The fact that a promise can also be rejected with a Throwable and/or Exception is implied and there is no need to also define that here. Refs: reactphp/promise#223
1 parent b3fafc4 commit 647aea4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Timer\timeout(…);
4747

4848
### timeout()
4949

50-
The `timeout(PromiseInterface<mixed, Throwable|mixed> $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed, TimeoutException|Throwable|mixed>` function can be used to
50+
The `timeout(PromiseInterface<mixed> $promise, float $time, ?LoopInterface $loop = null): PromiseInterface<mixed>` function can be used to
5151
cancel operations that take *too long*.
5252

5353
You need to pass in an input `$promise` that represents a pending operation
@@ -171,7 +171,7 @@ For more details on the promise primitives, please refer to the
171171

172172
### sleep()
173173

174-
The `sleep(float $time, ?LoopInterface $loop = null): PromiseInterface<void, RuntimeException>` function can be used to
174+
The `sleep(float $time, ?LoopInterface $loop = null): PromiseInterface<void>` function can be used to
175175
create a new promise that resolves in `$time` seconds.
176176

177177
```php
@@ -205,7 +205,7 @@ $timer->cancel();
205205

206206
> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.
207207
208-
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float, RuntimeException>` function can be used to
208+
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float>` function can be used to
209209
create a new promise that resolves in `$time` seconds with the `$time` as the fulfillment value.
210210

211211
```php
@@ -239,7 +239,7 @@ $timer->cancel();
239239

240240
> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.
241241
242-
The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void, TimeoutException|RuntimeException>` function can be used to
242+
The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void>` function can be used to
243243
create a new promise which rejects in `$time` seconds with a `TimeoutException`.
244244

245245
```php

0 commit comments

Comments
 (0)