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

feature: abort when() using AbortSignal #3551

Merged
merged 2 commits into from Oct 29, 2022
Merged

Conversation

deadbeef84
Copy link
Contributor

Code change checklist

  • Added/updated unit tests
  • Updated /docs. For new functionality, at least API.md should be updated
  • Verified that there is no significant performance drop (yarn mobx test:performance)

Initially I tried adding it to the _when function to support the callback-based when(), but I wasn't sure how to properly clean up the event listener in the disposer so I went for this approach instead.

Also not sure why it requires @types/node 18, according to node docs AbortSignal was added in node 15 / 14.18.

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2022

🦋 Changeset detected

Latest commit: ceda52a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@urugator
Copy link
Collaborator

Can you add a changeset (yarn changeset) and update docs?

@deadbeef84
Copy link
Contributor Author

Can you add a changeset (yarn changeset) and update docs?

Done!

@urugator urugator merged commit 223e368 into mobxjs:main Oct 29, 2022
@urugator
Copy link
Collaborator

Thank you!

@github-actions github-actions bot mentioned this pull request Oct 29, 2022
@deadbeef84 deadbeef84 deleted the when-signal branch October 29, 2022 15:12
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.

None yet

3 participants