-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Allow empty lists on command line #9090
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
Allow empty lists on command line #9090
Conversation
@@ -216,10 +216,24 @@ namespace ts { | |||
file: undefined, | |||
start: undefined, | |||
length: undefined, | |||
}, { | |||
messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'dom', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory'", |
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.
Shouldn't all 3 cases be errors? I don't think lib: []
is valid, so somebody along the line should throw an error.
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 learned in offline discussion with @weswigham that lib: []
IS valid, so carry on! :)
👍 |
👍 and thanks for creating the issue to add git-style " |
What about requests for |
Do we do that already? If so the simple fix is probably just to scan two characters (looking for any nonwhitespace character as the second) from the next argument string rather than just one. If we don't I could add such a check in preparation. |
we decided it was too much majic. i would rather have |
|
We can pass empty lists via
tsconfig.json
, so this just helps to lessen the disparity a bit. You get an empty list when a list-taking command is followed by another command or a single comma.