From 3f83b55899c3035738a61cb0ca3ba1e74cd8b4f9 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 8 Jun 2017 17:05:51 -0700 Subject: [PATCH] Added comments for fresh/regular unique symbol types --- src/compiler/checker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b9a167491d0..edbe017be7c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4537,6 +4537,10 @@ namespace ts { } // If the type is a fresh, unique symbol type and is not the type for this symbol, get its regular type + // For example: + // + // const x = Symbol(); // fresh type, e.g. 'symbol()' + // const y = x; // regular type, e.g. 'typeof x' if (type.flags & TypeFlags.Unique && type.flags & TypeFlags.Fresh && type.symbol !== symbol) { type = (type).regularType; }