Skip to content

Commit

Permalink
Merge pull request #871 from janeklb/patch-1
Browse files Browse the repository at this point in the history
chore: update sleep.ts example
  • Loading branch information
cowboyd authored Dec 24, 2023
2 parents 3b6358d + 327a295 commit 56132ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sleep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { action, suspend } from "./instructions.ts";
* import { main, sleep } from 'effection';
*
* await main(function*() {
* yield sleep(2000);
* yield* sleep(2000);
* console.log("Hello lazy world!");
* });
* ```
Expand Down
2 changes: 1 addition & 1 deletion www/docs/collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ await main(function*() {

yield* sleep(1000);

let { value: secondValue } = yield subscription.next();
let { value: secondValue } = yield* subscription.next();
console.log(secondValue); // logs 'world'
});
```
Expand Down
2 changes: 1 addition & 1 deletion www/docs/scope.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ await main(function*() {

signal.addEventListener('abort', () => console.log('done!'));

yield sleep(5000);
yield* sleep(5000);
// prints 'done!'
});
```
Expand Down

0 comments on commit 56132ec

Please sign in to comment.