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