mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 02:45:24 -05:00
Fix quick fix for isolatedDeclarations to keep trailing unknown in generics (#61227)
This commit is contained in:
@@ -621,6 +621,9 @@ function endOfRequiredTypeParameters(checker: TypeChecker, type: GenericType): n
|
||||
const fullTypeArguments = type.typeArguments;
|
||||
const target = type.target;
|
||||
for (let cutoff = 0; cutoff < fullTypeArguments.length; cutoff++) {
|
||||
if (target.localTypeParameters?.[cutoff].constraint === undefined) {
|
||||
continue;
|
||||
}
|
||||
const typeArguments = fullTypeArguments.slice(0, cutoff);
|
||||
const filledIn = checker.fillMissingTypeArguments(typeArguments, target.typeParameters, cutoff, /*isJavaScriptImplicitAny*/ false);
|
||||
if (filledIn.every((fill, i) => fill === fullTypeArguments[i])) {
|
||||
|
||||
Reference in New Issue
Block a user