johnfactotum / foliate-js

Render e-books in the browser
https://johnfactotum.github.io/foliate-js/reader.html
MIT License
318 stars 43 forks source link

typescript version of foliate js #27

Open astronautfa opened 1 month ago

astronautfa commented 1 month ago

is there any plans for typescript porting of foliate js?

This renderer could very well replace epub.js, but for us to really integrate it into our workflow a typescript port is needed

thanks for the great project

johnfactotum commented 1 month ago

Not for now. A good part of the code is written in a quite dynamic style and doesn't seem to translate easily to well typed TypeScript. Besides that, I quite like not having a build step. Perhaps one should start with creating declaration files first.

Radiergummi commented 1 month ago

Hey both of you; I'm porting parts of foliate-js to a Typescript project (I'm only interested in extracting metadata from various ebook formats for now) and would be willing to contribute those migrated parts back upstream, if this helps.

@astronautfa maybe a good starting point would be type stubs for the package?