Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Provide a dedicated typescript typings file #58

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented Apr 3, 2019

resolves #50

Even though this package had typings defined 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.

Copy link
Contributor

@eventualbuddha eventualbuddha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lukastaegert
Copy link
Member Author

I think a typings bundler--like what rollup does--would be a more ideal solution

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.

@lukastaegert lukastaegert merged commit 21d199b into master Apr 4, 2019
@lukastaegert lukastaegert deleted the add-dedicated-typescript-typings branch April 4, 2019 05:19
@eventualbuddha
Copy link
Contributor

I was not actually aware that such tools existed but I stand corrected, though most of those tools describe themselves as "hacky".

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.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide d.ts definitions?
2 participants