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 definitions #10

Open
yanickrochon opened this issue Nov 30, 2024 · 2 comments
Open

TypeScript definitions #10

yanickrochon opened this issue Nov 30, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@yanickrochon
Copy link

A lot of projects are using TypeScript. Adding types would be nices.

@jerosoler
Copy link
Owner

I like JSDOC better but if you want a types file we have this PR.

View this file in PR.

@jerosoler jerosoler self-assigned this Dec 3, 2024
@jerosoler jerosoler added the documentation Improvements or additions to documentation label Dec 3, 2024
@yanickrochon
Copy link
Author

Looks alright to me. Of course, if you want to preserve JavaScript, then you'd have to manually maintain the types separately.

However, since you are using Vite in library mode, then the suggested PR does exactly that, with an added bonus of having proper types in the source. Honestly, I used to be on the JS+JSDoc side until Vite come out. I hated writing Babel-related build configs, and hated more Browserify!

In my opinion, TypeScript is the way to go for sources. I understand those on the other side, however the tooling seem to not be in their favor; generating a .d.ts file from JSDoc is not as easy as generating .js+.d.ts from a single .ts file.

You are the author, your call 👍

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

No branches or pull requests

2 participants