Bump version to 5.1.6 and LKG
This commit is contained in:
Родитель
ac5884a54f
Коммит
6e4aa901f2
27
lib/tsc.js
27
lib/tsc.js
|
@ -18,7 +18,7 @@ and limitations under the License.
|
|||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.1";
|
||||
var version = "5.1.5";
|
||||
var version = "5.1.6";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
|
@ -52642,19 +52642,13 @@ function createTypeChecker(host) {
|
|||
if (getObjectFlags(type) & 4 /* Reference */) {
|
||||
const target = type.target;
|
||||
const typeArguments = getTypeArguments(type);
|
||||
if (length(target.typeParameters) === length(typeArguments)) {
|
||||
const ref = createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType]));
|
||||
return needApparentType ? getApparentType(ref) : ref;
|
||||
}
|
||||
return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type;
|
||||
} else if (type.flags & 2097152 /* Intersection */) {
|
||||
const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType));
|
||||
return types !== type.types ? getIntersectionType(types) : type;
|
||||
}
|
||||
return needApparentType ? getApparentType(type) : type;
|
||||
}
|
||||
function getThisArgument(type) {
|
||||
return getObjectFlags(type) & 4 /* Reference */ && length(getTypeArguments(type)) > getTypeReferenceArity(type) ? last(getTypeArguments(type)) : type;
|
||||
}
|
||||
function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {
|
||||
let mapper;
|
||||
let members;
|
||||
|
@ -53720,7 +53714,7 @@ function createTypeChecker(host) {
|
|||
return type.resolvedBaseConstraint;
|
||||
}
|
||||
const stack = [];
|
||||
return type.resolvedBaseConstraint = getTypeWithThisArgument(getImmediateBaseConstraint(type), getThisArgument(type));
|
||||
return type.resolvedBaseConstraint = getImmediateBaseConstraint(type);
|
||||
function getImmediateBaseConstraint(t) {
|
||||
if (!t.immediateBaseConstraint) {
|
||||
if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) {
|
||||
|
@ -53812,18 +53806,18 @@ function createTypeChecker(host) {
|
|||
}
|
||||
if (isGenericTupleType(t)) {
|
||||
const newElements = map(getElementTypes(t), (v, i) => {
|
||||
const constraint = t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
});
|
||||
return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
function getApparentTypeOfIntersectionType(type) {
|
||||
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
||||
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
||||
type,
|
||||
type,
|
||||
thisArgument,
|
||||
/*needApparentType*/
|
||||
true
|
||||
));
|
||||
|
@ -53874,8 +53868,9 @@ function createTypeChecker(host) {
|
|||
return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType);
|
||||
}
|
||||
function getApparentType(type) {
|
||||
const t = !(type.flags & 465829888 /* Instantiable */) ? type : getBaseConstraintOfType(type) || unknownType;
|
||||
return getObjectFlags(t) & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;
|
||||
const objectFlags = getObjectFlags(t);
|
||||
return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
}
|
||||
function getReducedApparentType(type) {
|
||||
return getReducedType(getApparentType(getReducedType(type)));
|
||||
|
@ -60663,7 +60658,7 @@ function createTypeChecker(host) {
|
|||
return 3 /* Maybe */;
|
||||
}
|
||||
const c = target2;
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) {
|
||||
const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
||||
const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
||||
if (result2 = skipTrue ? -1 /* True */ : isRelatedTo(
|
||||
|
|
|
@ -2304,7 +2304,7 @@ module.exports = __toCommonJS(server_exports);
|
|||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.1";
|
||||
var version = "5.1.5";
|
||||
var version = "5.1.6";
|
||||
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
|
@ -57293,19 +57293,13 @@ function createTypeChecker(host) {
|
|||
if (getObjectFlags(type) & 4 /* Reference */) {
|
||||
const target = type.target;
|
||||
const typeArguments = getTypeArguments(type);
|
||||
if (length(target.typeParameters) === length(typeArguments)) {
|
||||
const ref = createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType]));
|
||||
return needApparentType ? getApparentType(ref) : ref;
|
||||
}
|
||||
return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type;
|
||||
} else if (type.flags & 2097152 /* Intersection */) {
|
||||
const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType));
|
||||
return types !== type.types ? getIntersectionType(types) : type;
|
||||
}
|
||||
return needApparentType ? getApparentType(type) : type;
|
||||
}
|
||||
function getThisArgument(type) {
|
||||
return getObjectFlags(type) & 4 /* Reference */ && length(getTypeArguments(type)) > getTypeReferenceArity(type) ? last(getTypeArguments(type)) : type;
|
||||
}
|
||||
function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {
|
||||
let mapper;
|
||||
let members;
|
||||
|
@ -58371,7 +58365,7 @@ function createTypeChecker(host) {
|
|||
return type.resolvedBaseConstraint;
|
||||
}
|
||||
const stack = [];
|
||||
return type.resolvedBaseConstraint = getTypeWithThisArgument(getImmediateBaseConstraint(type), getThisArgument(type));
|
||||
return type.resolvedBaseConstraint = getImmediateBaseConstraint(type);
|
||||
function getImmediateBaseConstraint(t) {
|
||||
if (!t.immediateBaseConstraint) {
|
||||
if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) {
|
||||
|
@ -58463,18 +58457,18 @@ function createTypeChecker(host) {
|
|||
}
|
||||
if (isGenericTupleType(t)) {
|
||||
const newElements = map(getElementTypes(t), (v, i) => {
|
||||
const constraint = t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
});
|
||||
return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
function getApparentTypeOfIntersectionType(type) {
|
||||
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
||||
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
||||
type,
|
||||
type,
|
||||
thisArgument,
|
||||
/*needApparentType*/
|
||||
true
|
||||
));
|
||||
|
@ -58525,8 +58519,9 @@ function createTypeChecker(host) {
|
|||
return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType);
|
||||
}
|
||||
function getApparentType(type) {
|
||||
const t = !(type.flags & 465829888 /* Instantiable */) ? type : getBaseConstraintOfType(type) || unknownType;
|
||||
return getObjectFlags(t) & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;
|
||||
const objectFlags = getObjectFlags(t);
|
||||
return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
}
|
||||
function getReducedApparentType(type) {
|
||||
return getReducedType(getApparentType(getReducedType(type)));
|
||||
|
@ -65314,7 +65309,7 @@ function createTypeChecker(host) {
|
|||
return 3 /* Maybe */;
|
||||
}
|
||||
const c = target2;
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) {
|
||||
const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
||||
const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
||||
if (result2 = skipTrue ? -1 /* True */ : isRelatedTo(
|
||||
|
|
|
@ -35,7 +35,7 @@ var ts = (() => {
|
|||
"src/compiler/corePublic.ts"() {
|
||||
"use strict";
|
||||
versionMajorMinor = "5.1";
|
||||
version = "5.1.5";
|
||||
version = "5.1.6";
|
||||
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
|
@ -55084,19 +55084,13 @@ ${lanes.join("\n")}
|
|||
if (getObjectFlags(type) & 4 /* Reference */) {
|
||||
const target = type.target;
|
||||
const typeArguments = getTypeArguments(type);
|
||||
if (length(target.typeParameters) === length(typeArguments)) {
|
||||
const ref = createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType]));
|
||||
return needApparentType ? getApparentType(ref) : ref;
|
||||
}
|
||||
return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type;
|
||||
} else if (type.flags & 2097152 /* Intersection */) {
|
||||
const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType));
|
||||
return types !== type.types ? getIntersectionType(types) : type;
|
||||
}
|
||||
return needApparentType ? getApparentType(type) : type;
|
||||
}
|
||||
function getThisArgument(type) {
|
||||
return getObjectFlags(type) & 4 /* Reference */ && length(getTypeArguments(type)) > getTypeReferenceArity(type) ? last(getTypeArguments(type)) : type;
|
||||
}
|
||||
function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {
|
||||
let mapper;
|
||||
let members;
|
||||
|
@ -56162,7 +56156,7 @@ ${lanes.join("\n")}
|
|||
return type.resolvedBaseConstraint;
|
||||
}
|
||||
const stack = [];
|
||||
return type.resolvedBaseConstraint = getTypeWithThisArgument(getImmediateBaseConstraint(type), getThisArgument(type));
|
||||
return type.resolvedBaseConstraint = getImmediateBaseConstraint(type);
|
||||
function getImmediateBaseConstraint(t) {
|
||||
if (!t.immediateBaseConstraint) {
|
||||
if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) {
|
||||
|
@ -56254,18 +56248,18 @@ ${lanes.join("\n")}
|
|||
}
|
||||
if (isGenericTupleType(t)) {
|
||||
const newElements = map(getElementTypes(t), (v, i) => {
|
||||
const constraint = t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
});
|
||||
return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
function getApparentTypeOfIntersectionType(type) {
|
||||
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
||||
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
||||
type,
|
||||
type,
|
||||
thisArgument,
|
||||
/*needApparentType*/
|
||||
true
|
||||
));
|
||||
|
@ -56316,8 +56310,9 @@ ${lanes.join("\n")}
|
|||
return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType);
|
||||
}
|
||||
function getApparentType(type) {
|
||||
const t = !(type.flags & 465829888 /* Instantiable */) ? type : getBaseConstraintOfType(type) || unknownType;
|
||||
return getObjectFlags(t) & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;
|
||||
const objectFlags = getObjectFlags(t);
|
||||
return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
}
|
||||
function getReducedApparentType(type) {
|
||||
return getReducedType(getApparentType(getReducedType(type)));
|
||||
|
@ -63105,7 +63100,7 @@ ${lanes.join("\n")}
|
|||
return 3 /* Maybe */;
|
||||
}
|
||||
const c = target2;
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) {
|
||||
const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
||||
const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
||||
if (result2 = skipTrue ? -1 /* True */ : isRelatedTo(
|
||||
|
|
|
@ -35,7 +35,7 @@ var ts = (() => {
|
|||
"src/compiler/corePublic.ts"() {
|
||||
"use strict";
|
||||
versionMajorMinor = "5.1";
|
||||
version = "5.1.5";
|
||||
version = "5.1.6";
|
||||
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
|
@ -55084,19 +55084,13 @@ ${lanes.join("\n")}
|
|||
if (getObjectFlags(type) & 4 /* Reference */) {
|
||||
const target = type.target;
|
||||
const typeArguments = getTypeArguments(type);
|
||||
if (length(target.typeParameters) === length(typeArguments)) {
|
||||
const ref = createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType]));
|
||||
return needApparentType ? getApparentType(ref) : ref;
|
||||
}
|
||||
return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type;
|
||||
} else if (type.flags & 2097152 /* Intersection */) {
|
||||
const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType));
|
||||
return types !== type.types ? getIntersectionType(types) : type;
|
||||
}
|
||||
return needApparentType ? getApparentType(type) : type;
|
||||
}
|
||||
function getThisArgument(type) {
|
||||
return getObjectFlags(type) & 4 /* Reference */ && length(getTypeArguments(type)) > getTypeReferenceArity(type) ? last(getTypeArguments(type)) : type;
|
||||
}
|
||||
function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) {
|
||||
let mapper;
|
||||
let members;
|
||||
|
@ -56162,7 +56156,7 @@ ${lanes.join("\n")}
|
|||
return type.resolvedBaseConstraint;
|
||||
}
|
||||
const stack = [];
|
||||
return type.resolvedBaseConstraint = getTypeWithThisArgument(getImmediateBaseConstraint(type), getThisArgument(type));
|
||||
return type.resolvedBaseConstraint = getImmediateBaseConstraint(type);
|
||||
function getImmediateBaseConstraint(t) {
|
||||
if (!t.immediateBaseConstraint) {
|
||||
if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) {
|
||||
|
@ -56254,18 +56248,18 @@ ${lanes.join("\n")}
|
|||
}
|
||||
if (isGenericTupleType(t)) {
|
||||
const newElements = map(getElementTypes(t), (v, i) => {
|
||||
const constraint = t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v;
|
||||
return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v;
|
||||
});
|
||||
return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
function getApparentTypeOfIntersectionType(type) {
|
||||
function getApparentTypeOfIntersectionType(type, thisArgument) {
|
||||
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
||||
type,
|
||||
type,
|
||||
thisArgument,
|
||||
/*needApparentType*/
|
||||
true
|
||||
));
|
||||
|
@ -56316,8 +56310,9 @@ ${lanes.join("\n")}
|
|||
return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType);
|
||||
}
|
||||
function getApparentType(type) {
|
||||
const t = !(type.flags & 465829888 /* Instantiable */) ? type : getBaseConstraintOfType(type) || unknownType;
|
||||
return getObjectFlags(t) & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type;
|
||||
const objectFlags = getObjectFlags(t);
|
||||
return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t;
|
||||
}
|
||||
function getReducedApparentType(type) {
|
||||
return getReducedType(getApparentType(getReducedType(type)));
|
||||
|
@ -63105,7 +63100,7 @@ ${lanes.join("\n")}
|
|||
return 3 /* Maybe */;
|
||||
}
|
||||
const c = target2;
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
|
||||
if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) {
|
||||
const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
|
||||
const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
|
||||
if (result2 = skipTrue ? -1 /* True */ : isRelatedTo(
|
||||
|
|
|
@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.1";
|
||||
var version = "5.1.5";
|
||||
var version = "5.1.6";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "5.1.5",
|
||||
"version": "5.1.6",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
|
|
|
@ -4,7 +4,7 @@ export const versionMajorMinor = "5.1";
|
|||
// The following is baselined as a literal template type without intervention
|
||||
/** The version of the TypeScript compiler release */
|
||||
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
||||
export const version = "5.1.5" as string;
|
||||
export const version = "5.1.6" as string;
|
||||
|
||||
/**
|
||||
* Type of objects whose values are all of the same type.
|
||||
|
|
Загрузка…
Ссылка в новой задаче