From e0e14c8593fe7269a8c095efd856ea4c68ae5245 Mon Sep 17 00:00:00 2001 From: Vasiliy Vanchuk Date: Wed, 9 Nov 2016 16:49:19 +0300 Subject: [PATCH] Additional check for string presentation of types --- 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 878323a41b878..a3f0c43c4f84a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6763,7 +6763,7 @@ namespace ts { target = (target).regularType; } // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) return Ternary.True; + if (source === target || typeToString(source) === typeToString(target)) return Ternary.True; if (relation === identityRelation) { return isIdenticalTo(source, target);