-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Support the '--help' compiler flag. #351
Conversation
names: string[], | ||
isFixed: boolean[]= names.map(() => false), | ||
isCaseSensitive: boolean = true): string[] { | ||
export function ensureUniqueness(names: string[], isFixed: boolean[] = names.map(() => false), isCaseSensitive: boolean = false): string[] { |
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 left broken down for readability.
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.
agreed. We also shouldn't be using these default values here. The 'isFixed' in particularly is quite hard to read.
👍 |
|
||
// Sort our options by their names, (e.g. "--noImplicitAny" comes before "--watch") | ||
var optsList = optionDeclarations.slice(); | ||
optsList.sort((a, b) => compareValues(a.name.toLowerCase(), b.name.toLowerCase())); |
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.
why a.name.toLowerCase ? that's not needed we would be printing the name as it is so we shouldn't do lowercase on this
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 is just for the sort; we're displaying the names as intended, but our sort is based on case-insensitive lexicographic ordering.
This is ideal because, "sourcemap" should occur before "sourceRoot".
Conflicts: src/compiler/commandLineParser.ts src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json
Support the '--help' compiler flag.
Fixes #269.