-
-
Notifications
You must be signed in to change notification settings - Fork 17
align Interrupt apis and add optional interruption to async api #555
align Interrupt apis and add optional interruption to async api #555
Conversation
🦋 Changeset detectedLatest commit: f247355 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
962b3ba
to
5350d4d
Compare
@jessekelly881 - I'm not sure this is a good idea. Returning Effect.async((resume) => {
// no `return` statement
Effect.sync(() => {})
}) cc @mikearnaldi for further input |
True. The most "correct" return type would probably be |
I kind of like it tbh, dangling & unassigned effects could be flagged by an eslint plugin, this isn't the only case, for example logging in a generator has the same issue |
I quite like this too :) Will take a look at moving this forward shortly. |
Damn that was fast. Jaja. Looks good. :) |
@mikearnaldi Aligned the *Interrupt apis to use AbortSignal, and renamed asyncEither. I wonder if they should be called |
and rename asyncInterruptEither to asyncEither
d9f449b
to
f247355
Compare
I don't think so we should not have two names for |
c0c86c5
to
f247355
Compare
Cool, will stick with interrupt. |
Effect.async and Effect.asyncInterrupt can be merged into 1 function.