feat(ts): durable slot suspension ts cancellation#2953
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e9759af to
9a36cc4
Compare
030449f to
181a262
Compare
mrkaye97
reviewed
Feb 12, 2026
| return 'cancelling...'; | ||
| case ActionType.START_GET_GROUP_KEY: | ||
| return 'starting to get group key...'; | ||
| default: |
Contributor
There was a problem hiding this comment.
I think we should get into the habit of having that exhaustivenessCheck thing in places like this - just makes it so that we can't forget a case
mrkaye97
reviewed
Feb 12, 2026
| @@ -0,0 +1,89 @@ | |||
| export function createAbortError(message = 'Operation aborted'): Error { | |||
| const err: any = new Error(message); | |||
Contributor
There was a problem hiding this comment.
why do we need the type hint for any here?
mrkaye97
reviewed
Feb 12, 2026
| } | ||
|
|
||
| export function isAbortError(err: unknown): err is Error { | ||
| return err instanceof Error && (err.name === 'AbortError' || (err as any).code === 'ABORT_ERR'); |
Contributor
There was a problem hiding this comment.
maybe we should factor our AbortError and ABORT_ERR into constants if we're sharing them?
mrkaye97
reviewed
Feb 12, 2026
| // `signal` must never be sent over the wire. | ||
| const optsWithoutSignal: Omit<ChildRunOpts, 'signal'> & { signal?: never } = { ...opts }; | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| delete (optsWithoutSignal as any).signal; |
Contributor
There was a problem hiding this comment.
is it possible to do this without the assertion to any?
mrkaye97
approved these changes
Feb 12, 2026
Contributor
mrkaye97
left a comment
There was a problem hiding this comment.
left a couple small comments, but broadly looks good to me 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improves cancellation signaling and propagation for the typescript sdk
Type of change