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

Loosely typed #413

Open
GerbenRampaart opened this issue Aug 1, 2024 · 5 comments
Open

Loosely typed #413

GerbenRampaart opened this issue Aug 1, 2024 · 5 comments

Comments

@GerbenRampaart
Copy link

Hi thanks for the lib. It seems to be very loosely typed. No auto-completion of complex objects or type checking whatsoever in vscode for this library.

Is adding jsdoc or type definitions on the roadmap? I saw an issue raised about 5 years ago, maybe the plans changed?

If the maintainers aren't into typescript, maybe add jsdoc? Most modern IDEs generate auto-complete on jsdoc quite nicely.

@lholmquist
Copy link
Member

Hi, it is not something on the roadmap at the moment, however, if you have an interest in adding in some jsdoc things, PRs are welcome

@GerbenRampaart
Copy link
Author

Ok leaving this issue open. I'll fork tonight.

@GerbenRampaart
Copy link
Author

@lholmquist are you open for me to convert this project to typescript outputting ESM? It would involve going to version 10 for the esm change.

@lholmquist
Copy link
Member

@GerbenRampaart if we could have the TS bindings without having to convert the library to TS, that would be the ideal situation. I'm not really a TS fan personally

@GerbenRampaart
Copy link
Author

Sure. Can I add a tsconfig with allowJs: true and checkJs: true?

That way we can keep the files .js (instead of .ts) but it'll still have all of the benefits of the tsc (which is part of vscode).

It just won't have type annotations, because the files are .js, those will have to be jsdoc. But we do get all of the benefits of the language service, in terms of the development experience. It also means no build step is needed.

About the esm question, you seem to have dropped node16 support, so your userbase is already prepared for esm. You could release version 10 as esm.

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