-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix #3582, AbortSignal leaks @types/node #3583
Conversation
🦋 Changeset detectedLatest commit: 7161187 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 |
packages/mobx/src/api/when.ts
Outdated
@@ -9,11 +9,19 @@ import { | |||
allowStateChanges | |||
} from "../internal" | |||
|
|||
// https://github.com/mobxjs/mobx/issues/3582 | |||
export interface GenericAbortSignal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I don't think this type necessarily needs exporting?
Fixes #3582
Not sure if optimal, but I used the same solution as the one in
axios
package:https://github.com/axios/axios/blob/d032edda08948f3f613ff34f32af49cad3aa74db/index.d.ts#L215-L220
axios/axios#4229
axios/axios#5021 (why most of the interface is optional)
Another apporach I found is forward declaration:
declare global { export interface AbortSignal {} }
as eg in: https://github.com/aws/aws-sdk-js-v3/blob/826807a8e0435580cac0d209ca8199a6231a9f96/packages/types/src/serde.ts#L59-L70
Dunno if applicable.