From 3f82d21984ac8bfee01eb8c707b080e6f132b62e Mon Sep 17 00:00:00 2001 From: Antonio Stoilkov Date: Fri, 1 Mar 2024 13:08:03 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20add=20`signal`=20property?= =?UTF-8?q?=20to=20the=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index f952b04..7c57543 100644 --- a/readme.md +++ b/readme.md @@ -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. @@ -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.