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

Fix #3582, AbortSignal leaks @types/node #3583

Merged
merged 7 commits into from Jan 14, 2023
Merged

Conversation

urugator
Copy link
Collaborator

@urugator urugator commented Nov 22, 2022

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.

@changeset-bot
Copy link

changeset-bot bot commented Nov 22, 2022

🦋 Changeset detected

Latest commit: 7161187

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

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

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 urugator closed this Dec 13, 2022
@urugator urugator reopened this Dec 13, 2022
@@ -9,11 +9,19 @@ import {
allowStateChanges
} from "../internal"

// https://github.com/mobxjs/mobx/issues/3582
export interface GenericAbortSignal {
Copy link
Member

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?

@urugator urugator merged commit 2bccc5b into mobxjs:main Jan 14, 2023
@github-actions github-actions bot mentioned this pull request Jan 14, 2023
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.

mobx 6.7.0 leaks @types/node global typings
3 participants