Skip to content

MIDIMessageEvent data is incorrectly typed #60546

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

Open
kyledecot opened this issue Nov 20, 2024 · 1 comment
Open

MIDIMessageEvent data is incorrectly typed #60546

kyledecot opened this issue Nov 20, 2024 · 1 comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@kyledecot
Copy link

kyledecot commented Nov 20, 2024

🔎 Search Terms

In #57027 MIDIMessageEvent.data was changed from Uint8Array to Uint8Array | null (see https://github.com/microsoft/TypeScript/pull/57027/files#diff-dc0eab937d15e62545da3ed7b4f40ad6b24f15dd88fbc6ceda2bfb4ed8356eb0L14670).

According to https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent/data data the value will always be an Uint8Array.

🕗 Version & Regression Information

This changed in #57027

⏯ Playground Link

No response

💻 Code

🙁 Actual behavior

'event.data' is possibly 'null'.ts(18047)

🙂 Expected behavior

No warning about data property possibly being null.

Additional information about the issue

No response

@mikezaby
Copy link

I have encountered this problem as well.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Nov 27, 2024
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

3 participants