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

Add TypeScript type definitions #55

Open
mihkeleidast opened this issue Sep 26, 2022 · 4 comments · May be fixed by #58
Open

Add TypeScript type definitions #55

mihkeleidast opened this issue Sep 26, 2022 · 4 comments · May be fixed by #58

Comments

@mihkeleidast
Copy link
Contributor

mihkeleidast commented Sep 26, 2022

Hi again! As the tool can now be run programmatically, it would be good if there were also type definitions available for those of us trying to run this in a TS codebase.

The options are:

  1. Add type definitions as a separate package in DefinitelyTyped
  2. Add static type definitions in this repository - can be some maintenance burden.
  3. Add type annotations to the code / functions in JSDoc, then extract those with tsc for build/distribution - still a bit maintenance burden, but at least the types would be co-located with the source and would also give some code editor autocomplete helpers.
  4. Rewrite everything in TS (I wouldn't want to do that, seems like too much work TBH 😅).

Any preference towards some of these options?

@moroshko
Copy link
Owner

Hey @mihkeleidast,

  1. Sounds like a good start.
  2. Doesn't sound that bad to me.
  3. Meh...
  4. That would be great if anyone has the capacity to do it! The codebase is fairly small so shouldn't take too long.

@Aleuck
Copy link

Aleuck commented Oct 27, 2022

I would like to attempt the first option if that's alright.

@moroshko
Copy link
Owner

moroshko commented Nov 1, 2022

Thank you @Aleuck 🙏

@mihkeleidast mihkeleidast linked a pull request Nov 1, 2022 that will close this issue
@mihkeleidast
Copy link
Contributor Author

Got notifications from here, which reminded me that I actually started on the full TS conversion a while ago, but never filed the PR. Did so now to get some early feedback, see #58. Sorry for forgetting, hope we aren't doing too much duplicate work.

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 a pull request may close this issue.

3 participants