From 7409648416b2eff6173c24ab530948f002c42c96 Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 15 Aug 2017 10:24:15 -0700 Subject: [PATCH] Remove unused `UseTypeAliasValue` flag (#17779) --- src/compiler/declarationEmitter.ts | 5 ++--- src/compiler/types.ts | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 2c4be2ae7c..47a3be6efe 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -349,7 +349,6 @@ namespace ts { errorNameNode = declaration.name; const format = TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.WriteClassExpressionAsTypeLiteral | - TypeFormatFlags.UseTypeAliasValue | (shouldUseResolverType ? TypeFormatFlags.AddUndefined : 0); resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer); errorNameNode = undefined; @@ -368,7 +367,7 @@ namespace ts { resolver.writeReturnTypeOfSignatureDeclaration( signature, enclosingDeclaration, - TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, + TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, writer); errorNameNode = undefined; } @@ -633,7 +632,7 @@ namespace ts { resolver.writeTypeOfExpression( expr, enclosingDeclaration, - TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, + TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, writer); write(";"); writeLine(); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f0db341d99..faaed77995 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2717,7 +2717,6 @@ namespace ts { UseFullyQualifiedType = 1 << 8, // Write out the fully qualified type name (eg. Module.Type, instead of Type) InFirstTypeArgument = 1 << 9, // Writing first type argument of the instantiated type InTypeAlias = 1 << 10, // Writing type in type alias declaration - UseTypeAliasValue = 1 << 11, // Serialize the type instead of using type-alias. This is needed when we emit declaration file. SuppressAnyReturnType = 1 << 12, // If the return type is any-like, don't offer a return type. AddUndefined = 1 << 13, // Add undefined to types of initialized, non-optional parameters WriteClassExpressionAsTypeLiteral = 1 << 14, // Write a type literal instead of (Anonymous class)