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, Testing, Linting #37

Open
jhenson29 opened this issue Feb 18, 2020 · 3 comments
Open

Typescript, Testing, Linting #37

jhenson29 opened this issue Feb 18, 2020 · 3 comments

Comments

@jhenson29
Copy link

Typescript is mentioned in another issues here #14 (comment) and it's suggested that it would take a complete rewrite.

Not necessarily. The non-typing syntax of TypeScript is JavaScript. I've changed many projects (mostly non-OSS) over from JS to TS and it's relatively painless (especially if they are smaller, e.g. <10kLOC). I find that the only things I end up changing, other than adding types, are things that should have changed anyway, but weren't apparent without the types.

I think there is a significant benefit to both provide typing for end users as well as maintaining types in the project for future maintenance.

TypeScript can also address older node compliance (also mentioned in other issues/PR) by have TS compile to an earlier version of JS for publishing on NPM while allowing the source code to be maintained with the latest syntax.

I'd also like to see the addition of unit testing and linting to the project.

Would any or all of these changes (typing, testing, linting) be entertained?

@roccomuso
Copy link
Owner

Feel free to open PR :)

Units tests would be appreciated too

@jhenson29
Copy link
Author

Okay. I thought I’d ask first as I’ve had some people that are simply not interested in TS at all. I’ll review more this weekend.

@roccomuso
Copy link
Owner

I mean unit-test would be a good start. Rewriting in TS from scratch can lead to errors or break stuff.
I'd suggest first to have a simple unit test PR

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