Merge branch 'master' into requireJson

This commit is contained in:
Sheetal Nandi
2018-04-05 15:18:21 -07:00
1316 changed files with 143809 additions and 104228 deletions
+17 -1
View File
@@ -194,6 +194,13 @@ namespace ts {
category: Diagnostics.Basic_Options,
description: Diagnostics.Generates_corresponding_d_ts_file,
},
{
name: "declarationMap",
type: "boolean",
showInSimplifiedHelpView: true,
category: Diagnostics.Basic_Options,
description: Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,
},
{
name: "emitDeclarationOnly",
type: "boolean",
@@ -1345,12 +1352,21 @@ namespace ts {
return Array(paddingLength + 1).join(" ");
}
function isAllowedOption({ category, name }: CommandLineOption): boolean {
// Skip options which do not have a category or have category `Command_line_Options`
// Exclude all possible `Advanced_Options` in tsconfig.json which were NOT defined in command line
return category !== undefined
&& category !== Diagnostics.Command_line_Options
&& (category !== Diagnostics.Advanced_Options || compilerOptionsMap.has(name));
}
function writeConfigurations() {
// Filter applicable options to place in the file
const categorizedOptions = createMultiMap<CommandLineOption>();
for (const option of optionDeclarations) {
const { category } = option;
if (category !== undefined && category !== Diagnostics.Command_line_Options && category !== Diagnostics.Advanced_Options) {
if (isAllowedOption(option)) {
categorizedOptions.add(getLocaleSpecificMessage(category), option);
}
}