diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 2c4be2ae7c3d2..47a3be6efeaf3 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 2b3e5ab36df79..66fc4c7cdd5d2 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)