From da32f2b4f1884a235d80e3dc3fa86b413b6f5224 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 29 Mar 2018 09:36:28 -0700 Subject: [PATCH] Fix formatting --- src/compiler/checker.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fe29a7a3f13..b7b5dff3e9d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8344,17 +8344,17 @@ namespace ts { // resolution of the conditional type such that a later instantiation will properly distribute // over union types. const isDeferred = root.isDistributive && maybeTypeOfKind(checkType, TypeFlags.Instantiable); - let combinedMapper: TypeMapper; - if (root.inferTypeParameters) { - const context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, InferenceFlags.None); + let combinedMapper: TypeMapper; + if (root.inferTypeParameters) { + const context = createInferenceContext(root.inferTypeParameters, /*signature*/ undefined, InferenceFlags.None); if (!isDeferred) { // We don't want inferences from constraints as they may cause us to eagerly resolve the // conditional type instead of deferring resolution. Also, we always want strict function // types rules (i.e. proper contravariance) for inferences. inferTypes(context.inferences, checkType, extendsType, InferencePriority.NoConstraints | InferencePriority.AlwaysStrict); } - combinedMapper = combineTypeMappers(mapper, context); - } + combinedMapper = combineTypeMappers(mapper, context); + } if (!isDeferred) { // Return union of trueType and falseType for 'any' since it matches anything if (checkType.flags & TypeFlags.Any) {