Skip to content

TypeScript implementation #47

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

Closed
wants to merge 12 commits into from
Closed

Conversation

whyboris
Copy link
Contributor

This is a sample start on what a TypeScript implementation would look like.

Discussion: #46

The key benefit of TypeScript here is strict typing of method arguments.

Other changes:

  • using opn instead of open (deprecated)
  • simpler export
  • minor version bumps

⚠️ THIS IS NOT READY TO MERGE ⚠️

If TypeScript were to be implemented, the release procedures would need to change somewhat (it's the built files that need to be a part of the CLI, not the original TypeScript files).

If idea is approved, before release I would:

  • add JSDoc
  • add more strong typing of variables
  • clean up scripts (e.g. yarn test would run yarn build first)
  • figure out how to make the exported package still work 😅

@rtfpessoa
Copy link
Owner

@whyboris looks good. I need to get some time to test it.

@whyboris
Copy link
Contributor Author

No rush -- and I'm happy to work more on this -- let me know if you have any recommended direction (especially if different than what I've done) 👍

@rtfpessoa
Copy link
Owner

@whyboris noticed some changes required:

  • Change the main in package.json to the built one
  • Change src from the published libraries to built

and overall I would prefer to move all files to TS and enable a couple more settings in the end to enforce types and best practices.

@rtfpessoa
Copy link
Owner

@whyboris noticed some changes required:

  • Change the main in package.json to the built one
  • Change src from the published libraries to built
  • Change the binary inside bin to point to built directory also

and overall I would prefer to move all files to TS and enable a couple more settings in the end to enforce types and best practices.

Boris Yakubchik added 2 commits August 22, 2019 11:27
@whyboris
Copy link
Contributor Author

Sorry I dropped out after I opened this PR 😅 was a bit busy 😄
I'll likely find some time in the next month to address your recommendations 👍

@rtfpessoa rtfpessoa mentioned this pull request Aug 23, 2019
@rtfpessoa
Copy link
Owner

Closing for #53

@rtfpessoa rtfpessoa closed this Aug 23, 2019
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 this pull request may close these issues.

2 participants