From dd6bdaf16c69ab21cb45b65c9d49b51531846bd9 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:54:03 -0700 Subject: [PATCH] Give autoType its flags the normal way --- src/compiler/checker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3d65f9d8617f1..4c70ea94c42d4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -785,8 +785,7 @@ namespace ts { const errorTypes = new Map(); const anyType = createIntrinsicType(TypeFlags.Any, "any"); - const autoType = createIntrinsicType(TypeFlags.Any, "any"); - autoType.objectFlags |= ObjectFlags.NonInferrableType; + const autoType = createIntrinsicType(TypeFlags.Any, "any", ObjectFlags.NonInferrableType); const wildcardType = createIntrinsicType(TypeFlags.Any, "any"); const errorType = createIntrinsicType(TypeFlags.Any, "error"); const unresolvedType = createIntrinsicType(TypeFlags.Any, "unresolved");