jcmcneal / react-step-wizard

A modern flexible step wizard component built for React.
MIT License
585 stars 127 forks source link

Correctly indicate types #71

Closed ramiel closed 4 years ago

ramiel commented 4 years ago

Types should be indicated by types, not typings

resolritter commented 4 years ago

Actually...

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package

Note that the "typings" field is synonymous with "types", and could be used as well.

I wish they would deprecate one or the other.

jcmcneal commented 4 years ago

@resolritter I'll defer to you on whether you want to merge or close this.

resolritter commented 4 years ago

I'm indifferent about merging this since both "typings" and "types" are officially supported by TS. The real blocker is that we wouldn't know if it worked or not, distribution-wise, until the next NPM release. Locally seems to work fine, though.

FWIW I got the "typings" usage pattern from this template: tsdx/basic.ts. Quick Github search reveals lots of projects doing the same, so it won't be a problem in the future unless TS explicitly deprecates it.

I'd say this can be closed. If someone points out an issue with the current approach, it could be reopened.