File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10196,7 +10196,6 @@ namespace ts {
10196
10196
function getSimplifiedType(type: Type, writing: boolean): Type {
10197
10197
return type.flags & TypeFlags.IndexedAccess ? getSimplifiedIndexedAccessType(<IndexedAccessType>type, writing) :
10198
10198
type.flags & TypeFlags.Conditional ? getSimplifiedConditionalType(<ConditionalType>type, writing) :
10199
- type.flags & TypeFlags.Substitution ? writing ? (<SubstitutionType>type).typeVariable : (<SubstitutionType>type).substitute :
10200
10199
type;
10201
10200
}
10202
10201
@@ -12432,6 +12431,12 @@ namespace ts {
12432
12431
if (isFreshLiteralType(target)) {
12433
12432
target = (<FreshableType>target).regularType;
12434
12433
}
12434
+ if (source.flags & TypeFlags.Substitution) {
12435
+ source = (<SubstitutionType>source).substitute;
12436
+ }
12437
+ if (target.flags & TypeFlags.Substitution) {
12438
+ target = (<SubstitutionType>target).typeVariable;
12439
+ }
12435
12440
if (source.flags & TypeFlags.Simplifiable) {
12436
12441
source = getSimplifiedType(source, /*writing*/ false);
12437
12442
}
Original file line number Diff line number Diff line change @@ -3967,7 +3967,7 @@ namespace ts {
3967
3967
/* @internal */
3968
3968
ObjectFlagsType = Nullable | Never | Object | Union | Intersection ,
3969
3969
/* @internal */
3970
- Simplifiable = IndexedAccess | Conditional | Substitution ,
3970
+ Simplifiable = IndexedAccess | Conditional ,
3971
3971
// 'Narrowable' types are types where narrowing actually narrows.
3972
3972
// This *should* be every type other than null, undefined, void, and never
3973
3973
Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive ,
You can’t perform that action at this time.
0 commit comments