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

[PATCH] MediaStreamErrorEvent removed from TypeScript from 4.4 onward #236

Closed
SnarkBoojum opened this issue Sep 21, 2021 · 5 comments · Fixed by #237
Closed

[PATCH] MediaStreamErrorEvent removed from TypeScript from 4.4 onward #236

SnarkBoojum opened this issue Sep 21, 2021 · 5 comments · Fixed by #237
Labels
bug Something isn't working

Comments

@SnarkBoojum
Copy link

I'm trying to package lumino v2021.8.23 into Debian, and the compilation of virtualdom fails with the above error message.

@SnarkBoojum SnarkBoojum added the bug Something isn't working label Sep 21, 2021
@welcome
Copy link

welcome bot commented Sep 21, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@SnarkBoojum
Copy link
Author

Relevant link discussing making some things obsolete -- including MediaStreamEventError: microsoft/TypeScript-DOM-lib-generator#1029

Relevant link to a project with a similar problem: basst314/ngx-webcam#130

@SnarkBoojum
Copy link
Author

It looks like a trivial:

--- lumino.orig/packages/virtualdom/src/index.ts
+++ lumino/packages/virtualdom/src/index.ts
@@ -569,7 +569,7 @@
   ondrop: DragEvent;
   ondurationchange: Event;
   onemptied: Event;
-  onended: MediaStreamErrorEvent;
+  onended: ErrorEvent;
   onerror: ErrorEvent;
   onfocus: FocusEvent;
   oninput: Event;
--- lumino.orig/review/api/virtualdom.api.md
+++ lumino/review/api/virtualdom.api.md
@@ -52,7 +52,7 @@
     ondrop: DragEvent;
     ondurationchange: Event;
     onemptied: Event;
-    onended: MediaStreamErrorEvent;
+    onended: ErrorEvent;
     onerror: ErrorEvent;
     onfocus: FocusEvent;
     oninput: Event;

would be enough to get rid of this issue.

@SnarkBoojum SnarkBoojum changed the title Compiling virtualdom with tsc 4.4.3 fails with src/index.ts(572,12): error TS2304: Cannot find name 'MediaStreamErrorEvent'. [PATCH] MediaStreamErrorEvent removed from TypeScript from 4.4 onward Sep 21, 2021
@blink1073
Copy link
Member

Thanks @SnarkBoojum! I think this should help with jupyterlab/jupyterlab#10993 as well. Mind submitting a PR?

@SnarkBoojum
Copy link
Author

I have no clue how one does a PR, and for a two-line change, that looks overkill...

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants