Merge branch 'master' into watchImprovements

This commit is contained in:
Sheetal Nandi
2017-08-18 13:35:35 -07:00
3716 changed files with 8639 additions and 7867 deletions

View File

@@ -1116,7 +1116,7 @@ namespace ts {
if (option && typeof option.type !== "string") {
const customOption = <CommandLineOptionOfCustomType>option;
// Validate custom option type
if (!customOption.type.has(text)) {
if (!customOption.type.has(text.toLowerCase())) {
errors.push(
createDiagnosticForInvalidCustomType(
customOption,
@@ -1822,7 +1822,7 @@ namespace ts {
return value;
}
else if (typeof option.type !== "string") {
return option.type.get(value);
return option.type.get(typeof value === "string" ? value.toLowerCase() : value);
}
return normalizeNonListOptionValue(option, basePath, value);
}