From 7fd1e62a63caec46cf2f52f99bdcbf453a1debab Mon Sep 17 00:00:00 2001 From: Jesse Trinity Date: Wed, 6 Feb 2019 14:36:17 -0800 Subject: [PATCH] accepted new baselines --- src/services/utilities.ts | 3 ++- tests/baselines/reference/api/tsserverlibrary.d.ts | 4 ++-- tests/baselines/reference/api/typescript.d.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 8d48c32782a..285ca0cc6a9 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -1317,7 +1317,8 @@ namespace ts { export function getQuotePreference(sourceFile: SourceFile, preferences: UserPreferences): QuotePreference { if (preferences.quotePreference && preferences.quotePreference !== "auto") { return preferences.quotePreference === "single" ? QuotePreference.Single : QuotePreference.Double; - } else { + } + else { const firstModuleSpecifier = sourceFile.imports && find(sourceFile.imports, isStringLiteral); return firstModuleSpecifier ? quotePreferenceFromString(firstModuleSpecifier, sourceFile) : QuotePreference.Double; } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ee13a377f5e..53c40047e5d 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -3010,7 +3010,7 @@ declare namespace ts { } interface UserPreferences { readonly disableSuggestions?: boolean; - readonly quotePreference?: "double" | "single"; + readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "relative" | "non-relative"; @@ -7927,7 +7927,7 @@ declare namespace ts.server.protocol { } interface UserPreferences { readonly disableSuggestions?: boolean; - readonly quotePreference?: "double" | "single"; + readonly quotePreference?: "auto" | "double" | "single"; /** * If enabled, TypeScript will search through all external modules' exports and add them to the completions list. * This affects lone identifier completions but not completions on the right hand side of `obj.`. diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 49238bd3d6d..7e451446b54 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3010,7 +3010,7 @@ declare namespace ts { } interface UserPreferences { readonly disableSuggestions?: boolean; - readonly quotePreference?: "double" | "single"; + readonly quotePreference?: "auto" | "double" | "single"; readonly includeCompletionsForModuleExports?: boolean; readonly includeCompletionsWithInsertText?: boolean; readonly importModuleSpecifierPreference?: "relative" | "non-relative";