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

Convert to TypeScript #23

Open
jacobq opened this issue Oct 18, 2018 · 4 comments
Open

Convert to TypeScript #23

jacobq opened this issue Oct 18, 2018 · 4 comments

Comments

@jacobq
Copy link
Contributor

jacobq commented Oct 18, 2018

Personally, I have found writing in TypeScript to be very helpful in catching subtle mistakes (e.g. it would have caught the argument type mismatch in #14). It also has some other perks like good IDE integration (tab-completion, etc.). This project is small so the conversion would not be difficult (and I'd be happy to do it), but I'd like to know the rest of the team's thoughts on this.

  • Are you open to considering the idea of changing this project's language to TypeScript? If not, why not?
  • If so, how do you like the idea of using rollup-plugin-typescript?
@targos
Copy link
Member

targos commented Oct 18, 2018

Yes (but after merging #19)!

We started using TypeScript not long ago. See https://github.com/mljs?utf8=%E2%9C%93&q=&type=&language=typescript

We would not need rollup anymore. The 4 projects are based on this generator: https://github.com/cheminfo/generator-cheminfo/tree/master/generators/typescript

@targos
Copy link
Member

targos commented Oct 18, 2018

BTW, the only dependency of this project (ml-matrix) recently got TypeScript definitions: https://github.com/mljs/matrix/blob/master/matrix.d.ts

@jacobq jacobq changed the title Consider converting to TypeScript Convert to TypeScript Oct 18, 2018
@maasencioh
Copy link
Member

This could be a good chance to learn some ts for me, do you mind if I do this? @jacobq @targos

@jacobq
Copy link
Contributor Author

jacobq commented Oct 18, 2018

This could be a good chance to learn some ts for me, do you mind if I do this?

No objections from me. I also don't see any reason why it would have to be done by just one person. My recommendation would be (after that other PR lands): create a branch (say convert-to-typescript), start making PRs to it, and get feedback via comments/reviews. Once everything is switched over and working then merge to master.

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

3 participants