Skip to content

Commit 978b474

Browse files
committed
Extract value
1 parent eb8ed4f commit 978b474

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23700,8 +23700,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2370023700
// Source and target are types originating in the same generic type alias declaration.
2370123701
// Simply infer from source type arguments to target type arguments, with defaults applied.
2370223702
const params = getSymbolLinks(source.aliasSymbol).typeParameters!;
23703-
const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, getMinTypeArgumentCount(params), /*isJs*/ false);
23704-
const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, getMinTypeArgumentCount(params), /*isJs*/ false);
23703+
const minParams = getMinTypeArgumentCount(params);
23704+
const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, /*isJs*/ false);
23705+
const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, /*isJs*/ false);
2370523706
inferFromTypeArguments(sourceTypes, targetTypes!, getAliasVariances(source.aliasSymbol));
2370623707
}
2370723708
// And if there weren't any type arguments, there's no reason to run inference as the types must be the same.

0 commit comments

Comments
 (0)