Add --skip-typedefs option #4
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It looks like I'm rewriting your app, because this PR contains a lot of changes 😆
What's changes
I need to refactor your code to allow me to test that it can really recognize the newly added option. So, I need a factory function for creating app instance to reuse in test, that's why refactoring is needed. (sorry about that 😅)
*Note about commander
Actually it's not making any difference here (even I upgraded it to 2.12), but while i was working on refactoring I faced typing problem in commander which not allow me to create a factory function. I found a commit on their repository which fix this problem, but unfortunately it's not release yet (but it should soon).
For this reason, the PR contains one hacky workaround and it can be removed when the new commander version is out. You can wait until it's out before merging this PR (I'm fine with that)
The workaround is at
src/typings/index.d.ts
and only 2 files depend on it.Coverage
Hope this help