Skip to content

Commit

Permalink
✏️ add signal property to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Mar 1, 2024
1 parent d96e28f commit 3f82d21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can see the library in action in [this CodeSandbox](https://codesandbox.io/s

## API

#### `yieldOrContinue(strategy: 'interactive' | 'smooth' | 'idle')`
#### `yieldOrContinue(strategy: 'interactive' | 'smooth' | 'idle', signal?: AbortSignal)`

The complexity of the entire library is hidden behind this method. You can have great app performance by calling a single method.

Expand All @@ -86,8 +86,8 @@ async function findInFiles(query: string) {
### More complex scenarios

The library has two more functions available:
- `yieldControl(strategy: 'interactive' | 'smooth' | 'idle')`
- `isTimeToYield(strategy: 'interactive' | 'smooth' | 'idle')`
- `yieldControl(strategy: 'interactive' | 'smooth' | 'idle', signal?: AbortSignal)`
- `isTimeToYield(strategy: 'interactive' | 'smooth' | 'idle', signal?: AbortSignal)`

These two functions are used together to handle more advanced use cases.

Expand Down

0 comments on commit 3f82d21

Please sign in to comment.