-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: yargs update by passing interface to protect the type #888
Conversation
3d2287b
to
c02b8e9
Compare
protoc?: string | undefined; | ||
protoDirs?: string[]; | ||
commonProtoPath?: string; | ||
descriptor: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be ?
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this up.
export interface IArguments { | ||
[x: string]: unknown; | ||
outputDir?: string; | ||
grpcServiceConfig?: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when you use ?
it already means "can be undefined" so should be enough to say just grpcServiceConfig?: string
without | undefined
. Same for others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG. remove undefined
.
🤖 I have created a release \*beep\* \*boop\* --- ### [1.4.1](https://www.github.com/googleapis/gapic-generator-typescript/compare/v1.4.0...v1.4.1) (2021-06-04) ### Bug Fixes * make request optional in all cases ([#883](https://www.github.com/googleapis/gapic-generator-typescript/issues/883)) ([f6c73fe](https://www.github.com/googleapis/gapic-generator-typescript/commit/f6c73fec21dfadc81597c6b72f6f1bf222107fdb)) * yargs update by passing interface to protect the type ([#888](https://www.github.com/googleapis/gapic-generator-typescript/issues/888)) ([e87beaa](https://www.github.com/googleapis/gapic-generator-typescript/commit/e87beaae6431b8eda9654f7be2a1d2a780183db1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
With update on both package:
yargs
->^16.2.0
->17.0.0
sinon
->^10.0.0
->^11.0.0
see #865
The typescript can't compile on type checks with error msg:
because compiler expect
argv['outputDir'] rather than
argv.outputDir. The solution is pass in a interface to protect the type and avoid the typo by passing string in
[]`.Once it merge, the #880 should pass the test.