Provide a dedicated typescript typings file - #58
Conversation
eventualbuddha
left a comment
There was a problem hiding this comment.
This is an interesting approach. I think a typings bundler--like what rollup does--would be a more ideal solution, but this does work without additional tooling.
I was not actually aware that such tools existed but I stand corrected, though most of those tools describe themselves as "hacky". Will keep an eye on this. Unfortunately, none of them looks like they would support code-splitting how Rollup does it. That could become a really interesting addition to rollup-plugin-typescript. |
Yeah, I've come across a few but none seemed very good. I agree it would be great if rollup-plugin-typescript could just handle it. |
resolves #50
Even though this package had
typingsdefined in its package.json file (that linked to the source folder), I never got these to work for me. This PR adopts the approach followed by Rollup that maintains a hand-crafted file for its external types that is used internally as well to ensure consistency. In my experiments, this now works very well.Another advantage is that there no longer is a reason to publish the sources with the package. I still kept them in as removing them would be a breaking change but this is something I would recommend for the next major version.
Feedback welcome.