This repository was archived by the owner on Oct 12, 2022. It is now read-only.
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 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 do not think this is how i would describe the behavior.. it is a feature and not a bug really. it is a command line parser, so not sure what your expectations are for passing flags that expect a value but do not want to pass a value for them..
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.
Here is how I think about this: the compiler itself does not require that any types are passed, which I know because it works to pass an empty array in a tsconfig. There is no way to specify an equivalent command on the command line. That is what I'm trying to describe here.
Put another way, I don't think the
--types
flag in particular should require a value on the command line. I'd be fine with any of the syntaxes explored in microsoft/TypeScript#18581 for achieving that.Or I'm happy to change the description here to clarify the behavior.
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.
Also, @mhegazy, I used your words from the original issue to describe the behavior: "this a limitation in our commandline parser."
Additionally, the fact that passing no value for
--types
appears to work if there is another parameter after it supports the idea that this is a valid/expected use case that the argument parser handles incorrectly.