Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Types #220

Merged
merged 2 commits into from
Dec 12, 2018
Merged

Publish Types #220

merged 2 commits into from
Dec 12, 2018

Conversation

ryanbrainard
Copy link
Contributor

#219 introduced types, but as mentioned in #219 (comment), they aren't actually published anywhere.

This makes the following changes (a little different than discussed in #219 (comment), but I think this way is cleaner):

  • Move index.d.ts into src, next to index.js
  • At build time, move index.d.ts to lib, next to the transpiled index.js
  • Register ./lib/index.d.ts as main type file in package.json

To help test this out, I have published this as beta version 2.0.2-0. @lmontoute or @hburrows, can you test this out on your projects?

cc: @ipanasenko

- Move `index.d.ts` into `src`, next to `index.js`
- At build time, move `index.d.ts` to `lib`, next to the transpiled `index.js`
- Register `./lib/index.d.ts` as main type file in `package.json`
@lilyvelour
Copy link
Contributor

References fine for me in VSCode. Tested by deleting the types we're using, right clicking an import and going to declaration, which takes me to ./lib/index.d.ts.

We don't use every library feature exhaustively but I imported everything and there were no compiler errors across our whole project.

I think this is good to go 🙂

@ryanbrainard ryanbrainard merged commit 4a661f3 into master Dec 12, 2018
@ryanbrainard ryanbrainard deleted the ts-build branch December 12, 2018 02:25
@ryanbrainard
Copy link
Contributor Author

@lmontoute Awesome, thanks for testing that out. I'll get this out as 2.0.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants