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

Typescript #6

Closed
WorldMaker opened this issue Sep 10, 2018 · 3 comments
Closed

Typescript #6

WorldMaker opened this issue Sep 10, 2018 · 3 comments

Comments

@WorldMaker
Copy link

Would you be interested in hosting Typescript definitions in the npm package?

@zekedroid
Copy link
Owner

Probably not, the library is stable and does what it's meant to do. But thanks for suggesting! Out of curiosity, what would be the upside, in your opinion, to adding TypeScript to this particular library?

@WorldMaker
Copy link
Author

Typescript definitions make it faster to get started with a new-to-you library by providing autocomplete hints and other useful information. (Even for strictly JS only projects, some code editors/IDEs such as VSCode will use any extra Typescript information they have available to provide a better coding experience.) While the Typescript community has another major avenue for finding and installing type definition files, the best experience is always when npm install of the package itself includes all of it's type information. Of course it's an API surface to maintain, and I realize not every project wants to maintain that, which is why I ask first rather than PR first. There's an eclectic mix of projects on npm and I realize not everyone wants to care about Typescript. I'm happy to help maintain the definition files over time after I help contribute them, of course, and even help with any interest in converting a project to Typescript (which can be a good way to get some additional testing and basic safety checks in a library). Typescript is sometimes useful as a simpler "downleveler" for JS features than Babel, too, and I think that's useful to some projects.

Personally, I don't write JS without Typescript, and I think it's great for any size project of any stability/maintenance level, but I realize it's not always to everyone's taste.

@zekedroid
Copy link
Owner

Ah yes. While not something I personally would add to this project, I think TS definitions could help like you mention. It's not entirely clear to me what the added complexities of the project setup will be so I'd be open to reviewing a PR showing how it would work, granted this library continued to work as expected and with no added runtime dependencies needed.

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

No branches or pull requests

2 participants