Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.31k stars 308 forks source link

Can't build with Typescript 5.x.x #562

Closed ahettlin closed 9 months ago

ahettlin commented 9 months ago

Describe the bug When building with typescript 5.x.x, multiple of the following error are produced:

node_modules/@types/codemirror/index.d.ts:553:39 - error TS2304: Cannot find name 'DocumentAndElementEventHandlersEventMap'.

       on<K extends DOMEvent & keyof DocumentAndElementEventHandlersEventMap>(

Expected behavior Should build successfully. It works with typescript 4.9.5.

Version information

Additional context I'm guessing this could be an upstream issue with codemirror, but as I'm not familiar with either project, I at least wanted to file this here. I assume DocumentAndElementEventHandlersEventMap was removed in typescript 5?

ahettlin commented 9 months ago

Overriding @types/codemirror fromeasymde with "@types/codemirror": "5.60.10" works for typescript 5.1.6

Ionaru commented 9 months ago

Thank you for reporting this issue and investigating a fix. It sounds like upgrading the typescript and @types/codemirror packages fixes the issue, I'll do that soon.

Ionaru commented 9 months ago

Both typescript 4 and 5 should be able to build correctly in the next release :)

ahettlin commented 9 months ago

That was fast! Thanks!