Skip to content

Commit 8aff38e

Browse files
author
Paul van Brenk
committed
Add the entire tsconfig as a raw property to the parsed config.
1 parent c866996 commit 8aff38e

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -665,21 +665,6 @@ namespace ts {
665665
const options = extend(existingOptions, compilerOptions);
666666
const typingOptions: TypingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName);
667667

668-
// Contains the properties on the json we don't recognize, but the
669-
// host might so we return them as a property bag. This allows the host to handle
670-
// them, but doesn't have to deal with removing comments from the source json.
671-
const other: any = {};
672-
673-
const knownProperties = ["compilerOptions", "typingOptions", "files", "exclude"];
674-
675-
for (const prop in json) {
676-
if (ts.indexOf(knownProperties, prop) >= 0) {
677-
continue;
678-
}
679-
680-
other[prop] = json[prop];
681-
}
682-
683668
options.configFilePath = configFileName;
684669

685670
const fileNames = getFileNames(errors);
@@ -688,7 +673,7 @@ namespace ts {
688673
options,
689674
fileNames,
690675
typingOptions,
691-
other,
676+
raw: json,
692677
errors
693678
};
694679

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ namespace ts {
25922592
options: CompilerOptions;
25932593
typingOptions?: TypingOptions;
25942594
fileNames: string[];
2595-
other?: any;
2595+
raw?: any;
25962596
errors: Diagnostic[];
25972597
}
25982598

src/services/shims.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ namespace ts {
10091009
options: configFile.options,
10101010
typingOptions: configFile.typingOptions,
10111011
files: configFile.fileNames,
1012-
other: configFile.other,
1012+
raw: configFile.raw,
10131013
errors: realizeDiagnostics(configFile.errors, "\r\n")
10141014
};
10151015
});

0 commit comments

Comments
 (0)