Skip to content

event-target: make AddOptions type compatible with recent TS#46

Open
peat-psuwit wants to merge 1 commit into
mysticatea:masterfrom
peat-psuwit:abortsignal_nonnullable
Open

event-target: make AddOptions type compatible with recent TS#46
peat-psuwit wants to merge 1 commit into
mysticatea:masterfrom
peat-psuwit:abortsignal_nonnullable

Conversation

@peat-psuwit
Copy link
Copy Markdown

Recent update in TS add signal property to AddOptions interface [1].
Over there, the definition is:

    signal?: AbortSignal;

You'll notice that null is not in the definition. This causes the
whole EventTarget type to be incompatible with TS one.

To fix this incompatibility, just remove null from the field's union.

[1] https://github.com/microsoft/TypeScript/blob/feac9eb126e56837d16acb61cd019ce8520db76c/src/lib/dom.generated.d.ts#L8

Recent update in TS add `signal` property to `AddOptions` interface [1].
Over there, the definition is:

    signal?: AbortSignal;

You'll notice that `null` is not in the definition. This causes the
whole EventTarget type to be incompatible with TS one.

To fix this incompatibility, just remove `null` from the field's union.

[1] https://github.com/microsoft/TypeScript/blob/feac9eb126e56837d16acb61cd019ce8520db76c/src/lib/dom.generated.d.ts#L8
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.

1 participant