- replacing TryParseJson with existing readConfig

- push error for invalid enableAutoDiscovery option
- adding interfaces for jsons
- removing updateNotFoundTypings
- node_modules normalize file names before using
- adding safeListPath to discoverTypings
This commit is contained in:
Jason Ramsay committed 2016-03-01 11:50:27 -08:00
1 parent 0346a9889c
commit b3ceea3b3d
3 files changed
+70 -110

No files matched your search

+4 -1
View File
@@ -503,7 +503,7 @@ namespace ts {
*
* This method replace comment content by whitespace rather than completely remove them to keep positions in json parsing error reporting accurate.
*/
export function removeComments(jsonText: string): string {
function removeComments(jsonText: string): string {
let output = "";
const scanner = createScanner(ScriptTarget.ES5, /* skipTrivia */ false, LanguageVariant.Standard, jsonText);
let token: SyntaxKind;
@@ -614,6 +614,9 @@ namespace ts {
if (typeof jsonTypingOptions[id] === "boolean") {
options.enableAutoDiscovery = jsonTypingOptions[id];
}
else {
errors.push(createCompilerDiagnostic(Diagnostics.Unknown_typing_option_0, id));
}
}
else if (id === "include") {
options.include = convertJsonOptionToStringArray(id, jsonTypingOptions[id], errors);