Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify async fn API to just task(async () => {}) #477

Merged
merged 3 commits into from
Aug 24, 2022
Merged

Conversation

machty
Copy link
Owner

@machty machty commented Aug 24, 2022

Having just released the new API for task(this, async () => {}), it dawned on me that with a bit more babel transform magic, we can support an even simpler task API of just:

myTask = task(async () => {
  // ...
})

rather than having to pass in this as the first arg. This seems like an obvious additional win.

@machty machty merged commit 237930d into master Aug 24, 2022
@machty machty deleted the optional-this branch August 24, 2022 18:05
@jamescdavis
Copy link
Contributor

jamescdavis commented Oct 26, 2022

@machty Can you deploy the docs changes? 🙂

@machty
Copy link
Owner Author

machty commented Nov 8, 2022

@jamescdavis just pushed it now, thanks for the reminder. I can't believe how long the short-lived this-based documentation was live :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants