Skip to content
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

Merged
merged 9 commits into from
Aug 6, 2014

Conversation

DanielRosenwasser
Copy link
Member

Fixes #269.

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[] {
Copy link
Contributor

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.

Copy link
Contributor

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.

@mhegazy
Copy link
Contributor

mhegazy commented Aug 4, 2014

👍


// 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()));
Copy link
Member

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

Copy link
Member Author

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".

DanielRosenwasser added a commit that referenced this pull request Aug 6, 2014
@DanielRosenwasser DanielRosenwasser merged commit 3ad6e31 into master Aug 6, 2014
@DanielRosenwasser DanielRosenwasser deleted the wontYouPleasePleaseHelpMe branch August 6, 2014 22:49
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support --help in the new compiler
7 participants