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

Expand typescript checks #1198

Merged
merged 4 commits into from
Feb 21, 2020

Conversation

shadowspawn
Copy link
Collaborator

Pull Request

Problem

  1. The TypeScript tests are weakened by the options stored as properties, meaning random properties do not cause errors.
[key: string]: any; // options as properties

program.silly; // <-- might be a property...
  1. The testing coverage is a bit uneven, consisting mostly of examples from the README and the example files.

Solution

  1. Use some TypeScript magic to strip the options out of the Command type and use CommandWithoutOptionsAsProperties for most of the testing.

  2. Methodically test the variations of what is declared in the TypeScript.

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome 👍

@shadowspawn shadowspawn merged commit 3cf8cff into tj:develop Feb 21, 2020
@shadowspawn shadowspawn deleted the feature/stricter-typescript branch February 21, 2020 03:57
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Feb 22, 2020
@shadowspawn shadowspawn added this to the v5.0.0 milestone Feb 22, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Apr 5, 2020
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.

None yet

2 participants