libjass
libjass copied to clipboard
Why the npm package doesn't contains a type definition file.
First, thank you for creating this project. I just wonder why this project is written in Typescript but the package published at npm doesn't include a tsd file. I cannot directly use this lib without to create a type definition file by myself.
The quirk with how this library is compiled is that it's written as modules but the release is a single JS object with everything loaded up-front. The eager-loading is intentional since a stable class-loading order is required to make the serialization-deserialization work across multiple loaded instances of the library.
I think I had tried SitePen/dts-generator once and it was not able to do this transformation. I remember fooling around with the compiler API to see if I could generate a dts with this transformation manually but it was too much effort. Microsoft/dts-gen came out later but I don't think I ever tried it.