Add the entire tsconfig as a raw property to the parsed config.

This commit is contained in:
Paul van Brenk
2016-05-06 10:12:12 -07:00
parent c866996f30
commit 8aff38e128
3 changed files with 3 additions and 18 deletions

View File

@@ -665,21 +665,6 @@ namespace ts {
const options = extend(existingOptions, compilerOptions);
const typingOptions: TypingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName);
// Contains the properties on the json we don't recognize, but the
// host might so we return them as a property bag. This allows the host to handle
// them, but doesn't have to deal with removing comments from the source json.
const other: any = {};
const knownProperties = ["compilerOptions", "typingOptions", "files", "exclude"];
for (const prop in json) {
if (ts.indexOf(knownProperties, prop) >= 0) {
continue;
}
other[prop] = json[prop];
}
options.configFilePath = configFileName;
const fileNames = getFileNames(errors);
@@ -688,7 +673,7 @@ namespace ts {
options,
fileNames,
typingOptions,
other,
raw: json,
errors
};

View File

@@ -2592,7 +2592,7 @@ namespace ts {
options: CompilerOptions;
typingOptions?: TypingOptions;
fileNames: string[];
other?: any;
raw?: any;
errors: Diagnostic[];
}

View File

@@ -1009,7 +1009,7 @@ namespace ts {
options: configFile.options,
typingOptions: configFile.typingOptions,
files: configFile.fileNames,
other: configFile.other,
raw: configFile.raw,
errors: realizeDiagnostics(configFile.errors, "\r\n")
};
});