Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Timer\timeout(…);

### timeout()

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

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

### sleep()

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

```php
Expand Down Expand Up @@ -205,7 +205,7 @@ $timer->cancel();

> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.

The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float, RuntimeException>` function can be used to
The `resolve(float $time, ?LoopInterface $loop = null): PromiseInterface<float>` function can be used to
create a new promise that resolves in `$time` seconds with the `$time` as the fulfillment value.

```php
Expand Down Expand Up @@ -239,7 +239,7 @@ $timer->cancel();

> Deprecated since v1.8.0, see [`sleep()`](#sleep) instead.

The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void, TimeoutException|RuntimeException>` function can be used to
The `reject(float $time, ?LoopInterface $loop = null): PromiseInterface<void>` function can be used to
create a new promise which rejects in `$time` seconds with a `TimeoutException`.

```php
Expand Down