jupyterlab / lumino

Lumino is a library for building interactive web applications
https://lumino.readthedocs.io/
Other
618 stars 129 forks source link

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

Closed SnarkBoojum closed 2 years ago

SnarkBoojum commented 3 years ago

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

welcome[bot] commented 3 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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! :wave:
Welcome to the Jupyter community! :tada:

SnarkBoojum commented 3 years ago

Relevant link discussing making some things obsolete -- including MediaStreamEventError: https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1029

Relevant link to a project with a similar problem: https://github.com/basst314/ngx-webcam/issues/130

SnarkBoojum commented 3 years ago

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.

blink1073 commented 3 years ago

Thanks @SnarkBoojum! I think this should help with https://github.com/jupyterlab/jupyterlab/pull/10993 as well. Mind submitting a PR?

SnarkBoojum commented 2 years ago

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