Update LKG
This commit is contained in:
Родитель
9f33bf1cd5
Коммит
27bcd4cb5a
10
lib/tsc.js
10
lib/tsc.js
|
@ -55344,12 +55344,10 @@ function createTypeChecker(host) {
|
|||
const target = type.target ?? type;
|
||||
const typeVariable = getHomomorphicTypeVariable(target);
|
||||
if (typeVariable && !target.declaration.nameType) {
|
||||
const constraint = getConstraintTypeFromMappedType(type);
|
||||
if (constraint.flags & 4194304 /* Index */) {
|
||||
const baseConstraint = getBaseConstraintOfType(constraint.type);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
const modifiersType = getModifiersTypeFromMappedType(type);
|
||||
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
}
|
||||
return type;
|
||||
|
|
|
@ -60088,12 +60088,10 @@ function createTypeChecker(host) {
|
|||
const target = type.target ?? type;
|
||||
const typeVariable = getHomomorphicTypeVariable(target);
|
||||
if (typeVariable && !target.declaration.nameType) {
|
||||
const constraint = getConstraintTypeFromMappedType(type);
|
||||
if (constraint.flags & 4194304 /* Index */) {
|
||||
const baseConstraint = getBaseConstraintOfType(constraint.type);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
const modifiersType = getModifiersTypeFromMappedType(type);
|
||||
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
}
|
||||
return type;
|
||||
|
|
|
@ -57843,12 +57843,10 @@ ${lanes.join("\n")}
|
|||
const target = type.target ?? type;
|
||||
const typeVariable = getHomomorphicTypeVariable(target);
|
||||
if (typeVariable && !target.declaration.nameType) {
|
||||
const constraint = getConstraintTypeFromMappedType(type);
|
||||
if (constraint.flags & 4194304 /* Index */) {
|
||||
const baseConstraint = getBaseConstraintOfType(constraint.type);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
const modifiersType = getModifiersTypeFromMappedType(type);
|
||||
const baseConstraint = isGenericMappedType(modifiersType) ? getApparentTypeOfMappedType(modifiersType) : getBaseConstraintOfType(modifiersType);
|
||||
if (baseConstraint && everyType(baseConstraint, (t) => isArrayOrTupleType(t) || isArrayOrTupleOrIntersection(t))) {
|
||||
return instantiateType(target, prependTypeMapping(typeVariable, baseConstraint, type.mapper));
|
||||
}
|
||||
}
|
||||
return type;
|
||||
|
|
Загрузка…
Ссылка в новой задаче