From c12fc0d6c3faa413b9feb2f3e9751e5614d8e5fe Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 28 Feb 2018 17:55:56 -0800 Subject: [PATCH] Format unique symmbol string output with `unique symbol` and not `typeof` within checker (#22247) * Accept baseline update to symbol test * Set default node flag instead of accepting new error --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ffbd83456aa..9579ba80d0f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2756,7 +2756,7 @@ namespace ts { } } - function typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer: EmitTextWriter = createTextWriter("")): string { + function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType, writer: EmitTextWriter = createTextWriter("")): string { const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors, writer); Debug.assert(typeNode !== undefined, "should always get typenode"); const options = { removeComments: true };