File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -9774,6 +9774,10 @@ namespace ts {
9774
9774
return getObjectFlags(type) & ObjectFlags.Reference && some((<TypeReference>type).typeArguments, isUnconstrainedTypeParameter);
9775
9775
}
9776
9776
9777
+ /**
9778
+ * getTypeReferenceId(A<T, number, U>) returns "111=0-12=1"
9779
+ * where A.id=111 and number.id=12
9780
+ */
9777
9781
function getTypeReferenceId(type: TypeReference, typeParameters: Type[]) {
9778
9782
let result = "" + type.target.id;
9779
9783
for (const t of type.typeArguments) {
@@ -9792,6 +9796,10 @@ namespace ts {
9792
9796
return result;
9793
9797
}
9794
9798
9799
+ /**
9800
+ * To improve caching, the relation key for two generic types uses the target's id plus ids of the type parameters.
9801
+ * For other cases, the types ids are used.
9802
+ */
9795
9803
function getRelationKey(source: Type, target: Type, relation: Map<RelationComparisonResult>) {
9796
9804
if (relation === identityRelation && source.id > target.id) {
9797
9805
const temp = source;
You can’t perform that action at this time.
0 commit comments