proto-loader: Fix yargs types & update README #5
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.
There seems to have been a type update via patch version in
@types/yargs
whereargv._
is now defined as_: Array<string | number>;
, see:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/6de1fd533383aa8fcac9460edd2ee5d36989fa7b/types/yargs/index.d.ts#L643
This is why we need to do
argv._ as string[]
as well as addparse-positional-numbers: false
parser config to prevent yargs from parsing positional args to numbers.I need to use@ts-ignore
because the types for yargs-parser need updating, see: DefinitelyTyped/DefinitelyTyped#50196I noticed this as a did a clean clone of this repo follow by a
npm install
and the compile script failed to build.I also added example usage to the README as I believe this will help with understanding how to use the generator.