@typescript-deploys/pr-build 5.4.0-pr-56281-22 → 5.4.0-pr-55774-21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.es5.d.ts +0 -12
- package/lib/tsc.js +107 -117
- package/lib/tsserver.js +121 -119
- package/lib/typescript.d.ts +3 -1
- package/lib/typescript.js +121 -119
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20231108`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4165,6 +4165,7 @@ ${lanes.join("\n")}
|
|
|
4165
4165
|
TypeFormatFlags2[TypeFormatFlags2["None"] = 0] = "None";
|
|
4166
4166
|
TypeFormatFlags2[TypeFormatFlags2["NoTruncation"] = 1] = "NoTruncation";
|
|
4167
4167
|
TypeFormatFlags2[TypeFormatFlags2["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType";
|
|
4168
|
+
TypeFormatFlags2[TypeFormatFlags2["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams";
|
|
4168
4169
|
TypeFormatFlags2[TypeFormatFlags2["UseStructuralFallback"] = 8] = "UseStructuralFallback";
|
|
4169
4170
|
TypeFormatFlags2[TypeFormatFlags2["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature";
|
|
4170
4171
|
TypeFormatFlags2[TypeFormatFlags2["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType";
|
|
@@ -4184,7 +4185,7 @@ ${lanes.join("\n")}
|
|
|
4184
4185
|
TypeFormatFlags2[TypeFormatFlags2["InElementType"] = 2097152] = "InElementType";
|
|
4185
4186
|
TypeFormatFlags2[TypeFormatFlags2["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument";
|
|
4186
4187
|
TypeFormatFlags2[TypeFormatFlags2["InTypeAlias"] = 8388608] = "InTypeAlias";
|
|
4187
|
-
TypeFormatFlags2[TypeFormatFlags2["NodeBuilderFlagsMask"] =
|
|
4188
|
+
TypeFormatFlags2[TypeFormatFlags2["NodeBuilderFlagsMask"] = 848330095] = "NodeBuilderFlagsMask";
|
|
4188
4189
|
return TypeFormatFlags2;
|
|
4189
4190
|
})(TypeFormatFlags || {});
|
|
4190
4191
|
SymbolFormatFlags = /* @__PURE__ */ ((SymbolFormatFlags2) => {
|
|
@@ -4349,6 +4350,7 @@ ${lanes.join("\n")}
|
|
|
4349
4350
|
InternalSymbolName2["ExportEquals"] = "export=";
|
|
4350
4351
|
InternalSymbolName2["Default"] = "default";
|
|
4351
4352
|
InternalSymbolName2["This"] = "this";
|
|
4353
|
+
InternalSymbolName2["InstantiationExpression"] = "__instantiationExpression";
|
|
4352
4354
|
return InternalSymbolName2;
|
|
4353
4355
|
})(InternalSymbolName || {});
|
|
4354
4356
|
NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
|
|
@@ -50168,7 +50170,7 @@ ${lanes.join("\n")}
|
|
|
50168
50170
|
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
|
|
50169
50171
|
}
|
|
50170
50172
|
function toNodeBuilderFlags(flags = 0 /* None */) {
|
|
50171
|
-
return flags &
|
|
50173
|
+
return flags & 848330095 /* NodeBuilderFlagsMask */;
|
|
50172
50174
|
}
|
|
50173
50175
|
function isClassInstanceSide(type) {
|
|
50174
50176
|
return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */));
|
|
@@ -50417,7 +50419,7 @@ ${lanes.join("\n")}
|
|
|
50417
50419
|
}
|
|
50418
50420
|
return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode));
|
|
50419
50421
|
}
|
|
50420
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */
|
|
50422
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */) {
|
|
50421
50423
|
const name2 = typeParameterToName(type, context);
|
|
50422
50424
|
context.approximateLength += idText(name2).length;
|
|
50423
50425
|
return factory.createTypeReferenceNode(
|
|
@@ -50628,6 +50630,21 @@ ${lanes.join("\n")}
|
|
|
50628
50630
|
const typeId = type2.id;
|
|
50629
50631
|
const symbol = type2.symbol;
|
|
50630
50632
|
if (symbol) {
|
|
50633
|
+
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
50634
|
+
if (isInstantiationExpressionType) {
|
|
50635
|
+
const instantiationExpressionType = type2;
|
|
50636
|
+
const existing = instantiationExpressionType.node;
|
|
50637
|
+
if (isTypeQueryNode(existing) && getTypeFromTypeNode(existing) === type2) {
|
|
50638
|
+
const typeNode = serializeExistingTypeNode(context, existing);
|
|
50639
|
+
if (typeNode) {
|
|
50640
|
+
return typeNode;
|
|
50641
|
+
}
|
|
50642
|
+
}
|
|
50643
|
+
if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) {
|
|
50644
|
+
return createElidedInformationPlaceholder(context);
|
|
50645
|
+
}
|
|
50646
|
+
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
50647
|
+
}
|
|
50631
50648
|
const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */;
|
|
50632
50649
|
if (isJSConstructor(symbol.valueDeclaration)) {
|
|
50633
50650
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -50639,7 +50656,7 @@ ${lanes.join("\n")}
|
|
|
50639
50656
|
false
|
|
50640
50657
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
50641
50658
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
50642
|
-
} else if ((
|
|
50659
|
+
} else if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
50643
50660
|
const typeAlias = getTypeAliasForTypeLiteral(type2);
|
|
50644
50661
|
if (typeAlias) {
|
|
50645
50662
|
return symbolToTypeNode(typeAlias, context, 788968 /* Type */);
|
|
@@ -50650,20 +50667,6 @@ ${lanes.join("\n")}
|
|
|
50650
50667
|
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
50651
50668
|
}
|
|
50652
50669
|
} else {
|
|
50653
|
-
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
50654
|
-
if (isInstantiationExpressionType) {
|
|
50655
|
-
const instantiationExpressionType = type2;
|
|
50656
|
-
if (isTypeQueryNode(instantiationExpressionType.node)) {
|
|
50657
|
-
const typeNode = serializeExistingTypeNode(context, instantiationExpressionType.node);
|
|
50658
|
-
if (typeNode) {
|
|
50659
|
-
return typeNode;
|
|
50660
|
-
}
|
|
50661
|
-
}
|
|
50662
|
-
if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
50663
|
-
return createElidedInformationPlaceholder(context);
|
|
50664
|
-
}
|
|
50665
|
-
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
50666
|
-
}
|
|
50667
50670
|
return createTypeNodeFromObjectType(type2);
|
|
50668
50671
|
}
|
|
50669
50672
|
function shouldWriteTypeOfFunctionSymbol() {
|
|
@@ -51217,36 +51220,65 @@ ${lanes.join("\n")}
|
|
|
51217
51220
|
true
|
|
51218
51221
|
)[0];
|
|
51219
51222
|
let cleanup;
|
|
51220
|
-
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) {
|
|
51221
|
-
|
|
51222
|
-
|
|
51223
|
-
|
|
51224
|
-
|
|
51225
|
-
|
|
51226
|
-
if (
|
|
51227
|
-
|
|
51228
|
-
|
|
51229
|
-
|
|
51230
|
-
|
|
51231
|
-
|
|
51232
|
-
|
|
51223
|
+
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && (some(expandedParams) || some(signature.typeParameters))) {
|
|
51224
|
+
let pushFakeScope2 = function(kind2, addAll) {
|
|
51225
|
+
Debug.assert(context.enclosingDeclaration);
|
|
51226
|
+
let existingFakeScope;
|
|
51227
|
+
if (getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration === kind2) {
|
|
51228
|
+
existingFakeScope = context.enclosingDeclaration;
|
|
51229
|
+
} else if (context.enclosingDeclaration.parent && getNodeLinks(context.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === kind2) {
|
|
51230
|
+
existingFakeScope = context.enclosingDeclaration.parent;
|
|
51231
|
+
}
|
|
51232
|
+
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
51233
|
+
const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();
|
|
51234
|
+
let newLocals;
|
|
51235
|
+
addAll((name, symbol) => {
|
|
51236
|
+
if (!locals.has(name)) {
|
|
51237
|
+
newLocals = append(newLocals, name);
|
|
51238
|
+
locals.set(name, symbol);
|
|
51239
|
+
}
|
|
51240
|
+
});
|
|
51241
|
+
if (!newLocals)
|
|
51242
|
+
return;
|
|
51243
|
+
const oldCleanup = cleanup;
|
|
51244
|
+
function undo() {
|
|
51233
51245
|
forEach(newLocals, (s) => locals.delete(s));
|
|
51234
|
-
|
|
51235
|
-
|
|
51246
|
+
oldCleanup == null ? void 0 : oldCleanup();
|
|
51247
|
+
}
|
|
51236
51248
|
if (existingFakeScope) {
|
|
51237
|
-
cleanup =
|
|
51249
|
+
cleanup = undo;
|
|
51238
51250
|
} else {
|
|
51239
51251
|
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
51240
|
-
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration =
|
|
51252
|
+
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = kind2;
|
|
51241
51253
|
fakeScope.locals = locals;
|
|
51242
51254
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
51243
51255
|
setParent(fakeScope, saveEnclosingDeclaration);
|
|
51244
51256
|
context.enclosingDeclaration = fakeScope;
|
|
51245
51257
|
cleanup = () => {
|
|
51246
51258
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
51247
|
-
|
|
51259
|
+
undo();
|
|
51248
51260
|
};
|
|
51249
51261
|
}
|
|
51262
|
+
};
|
|
51263
|
+
var pushFakeScope = pushFakeScope2;
|
|
51264
|
+
pushFakeScope2(
|
|
51265
|
+
"params",
|
|
51266
|
+
(add) => {
|
|
51267
|
+
for (const param of expandedParams) {
|
|
51268
|
+
add(param.escapedName, param);
|
|
51269
|
+
}
|
|
51270
|
+
}
|
|
51271
|
+
);
|
|
51272
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
51273
|
+
pushFakeScope2(
|
|
51274
|
+
"typeParams",
|
|
51275
|
+
(add) => {
|
|
51276
|
+
for (const typeParam of signature.typeParameters ?? emptyArray) {
|
|
51277
|
+
const typeParamName = typeParameterToName(typeParam, context).escapedText;
|
|
51278
|
+
add(typeParamName, typeParam.symbol);
|
|
51279
|
+
}
|
|
51280
|
+
}
|
|
51281
|
+
);
|
|
51250
51282
|
}
|
|
51251
51283
|
}
|
|
51252
51284
|
const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports));
|
|
@@ -51791,7 +51823,7 @@ ${lanes.join("\n")}
|
|
|
51791
51823
|
return identifier;
|
|
51792
51824
|
}
|
|
51793
51825
|
}
|
|
51794
|
-
function
|
|
51826
|
+
function typeParameterShadowsOtherTypeParameterInScope(escapedName, context, type) {
|
|
51795
51827
|
const result = resolveName(
|
|
51796
51828
|
context.enclosingDeclaration,
|
|
51797
51829
|
escapedName,
|
|
@@ -51802,11 +51834,8 @@ ${lanes.join("\n")}
|
|
|
51802
51834
|
/*isUse*/
|
|
51803
51835
|
false
|
|
51804
51836
|
);
|
|
51805
|
-
if (result) {
|
|
51806
|
-
|
|
51807
|
-
return false;
|
|
51808
|
-
}
|
|
51809
|
-
return true;
|
|
51837
|
+
if (result && result.flags & 262144 /* TypeParameter */) {
|
|
51838
|
+
return result !== type.symbol;
|
|
51810
51839
|
}
|
|
51811
51840
|
return false;
|
|
51812
51841
|
}
|
|
@@ -51832,7 +51861,7 @@ ${lanes.join("\n")}
|
|
|
51832
51861
|
const rawtext = result.escapedText;
|
|
51833
51862
|
let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0;
|
|
51834
51863
|
let text = rawtext;
|
|
51835
|
-
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) ||
|
|
51864
|
+
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
51836
51865
|
i++;
|
|
51837
51866
|
text = `${rawtext}_${i}`;
|
|
51838
51867
|
}
|
|
@@ -51843,7 +51872,7 @@ ${lanes.join("\n")}
|
|
|
51843
51872
|
}
|
|
51844
51873
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
51845
51874
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
51846
|
-
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(
|
|
51875
|
+
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(text);
|
|
51847
51876
|
}
|
|
51848
51877
|
return result;
|
|
51849
51878
|
}
|
|
@@ -51988,7 +52017,10 @@ ${lanes.join("\n")}
|
|
|
51988
52017
|
return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
|
|
51989
52018
|
}
|
|
51990
52019
|
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {
|
|
51991
|
-
|
|
52020
|
+
while (getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration) {
|
|
52021
|
+
enclosingDeclaration = enclosingDeclaration.parent;
|
|
52022
|
+
}
|
|
52023
|
+
return enclosingDeclaration;
|
|
51992
52024
|
}
|
|
51993
52025
|
function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
|
|
51994
52026
|
if (!isErrorType(type) && enclosingDeclaration) {
|
|
@@ -52068,7 +52100,7 @@ ${lanes.join("\n")}
|
|
|
52068
52100
|
}
|
|
52069
52101
|
if (isIdentifier(node)) {
|
|
52070
52102
|
const type = getDeclaredTypeOfSymbol(sym);
|
|
52071
|
-
const name = sym.flags & 262144 /* TypeParameter */
|
|
52103
|
+
const name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(type, context) : factory.cloneNode(node);
|
|
52072
52104
|
name.symbol = sym;
|
|
52073
52105
|
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) };
|
|
52074
52106
|
}
|
|
@@ -56685,7 +56717,13 @@ ${lanes.join("\n")}
|
|
|
56685
56717
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
56686
56718
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
56687
56719
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
56688
|
-
|
|
56720
|
+
if (isTupleType(modifiersType)) {
|
|
56721
|
+
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
56722
|
+
} else if (isArrayType(modifiersType)) {
|
|
56723
|
+
addMemberForKeyType(numberType);
|
|
56724
|
+
} else {
|
|
56725
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
56726
|
+
}
|
|
56689
56727
|
} else {
|
|
56690
56728
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
56691
56729
|
}
|
|
@@ -57481,69 +57519,22 @@ ${lanes.join("\n")}
|
|
|
57481
57519
|
}
|
|
57482
57520
|
return emptyArray;
|
|
57483
57521
|
}
|
|
57484
|
-
function getSignaturesOfType(
|
|
57485
|
-
const
|
|
57486
|
-
|
|
57487
|
-
|
|
57488
|
-
|
|
57489
|
-
let memberName;
|
|
57490
|
-
if (everyType(reducedType, (t) => {
|
|
57491
|
-
var _a2;
|
|
57492
|
-
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
57493
|
-
})) {
|
|
57494
|
-
if (reducedType.arrayFallbackSignatures) {
|
|
57495
|
-
return reducedType.arrayFallbackSignatures;
|
|
57496
|
-
}
|
|
57497
|
-
const numTypes = reducedType.types.length;
|
|
57498
|
-
const numSigs = (_a = reducedType.types[0].symbol.declarations) == null ? void 0 : _a.length;
|
|
57499
|
-
Debug.assert(numSigs);
|
|
57500
|
-
const returnTypes = new Array(numSigs).fill(
|
|
57501
|
-
/*value*/
|
|
57502
|
-
void 0
|
|
57503
|
-
).map((_, isig) => {
|
|
57504
|
-
const rtset = /* @__PURE__ */ new Set();
|
|
57505
|
-
new Array(numTypes).fill(
|
|
57506
|
-
/*value*/
|
|
57507
|
-
void 0
|
|
57508
|
-
).forEach((_2, itype) => {
|
|
57509
|
-
const callSignatures = reducedType.types[itype].callSignatures ?? getSignaturesOfStructuredType(reducedType.types[itype], 0 /* Call */);
|
|
57510
|
-
if (callSignatures[isig].typeParameters)
|
|
57511
|
-
return;
|
|
57512
|
-
const returnType = callSignatures[isig].resolvedReturnType ?? getReturnTypeOfSignature(callSignatures[isig]);
|
|
57513
|
-
Debug.assert(returnType);
|
|
57514
|
-
rtset.add(returnType);
|
|
57515
|
-
});
|
|
57516
|
-
const art = [];
|
|
57517
|
-
rtset.forEach((rt) => art.push(rt));
|
|
57518
|
-
if (art.length === 0)
|
|
57519
|
-
return void 0;
|
|
57520
|
-
if (art.length === 1)
|
|
57521
|
-
return art[0];
|
|
57522
|
-
return getUnionType(art, 2 /* Subtype */);
|
|
57523
|
-
});
|
|
57524
|
-
const arrayArg = mapType(reducedType, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
57525
|
-
const arrayType = createArrayType(arrayArg, someType(reducedType, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
57526
|
-
const result2 = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
57527
|
-
returnTypes.forEach((returnType, sigidx) => {
|
|
57528
|
-
if (returnType)
|
|
57529
|
-
result2[sigidx].resolvedReturnType = returnTypes[sigidx];
|
|
57530
|
-
});
|
|
57531
|
-
return reducedType.arrayFallbackSignatures = result2;
|
|
57532
|
-
}
|
|
57522
|
+
function getSignaturesOfType(type, kind) {
|
|
57523
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
57524
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
57525
|
+
if (type.arrayFallbackSignatures) {
|
|
57526
|
+
return type.arrayFallbackSignatures;
|
|
57533
57527
|
}
|
|
57534
|
-
|
|
57535
|
-
|
|
57536
|
-
|
|
57537
|
-
|
|
57538
|
-
|
|
57539
|
-
|
|
57540
|
-
|
|
57541
|
-
return
|
|
57528
|
+
let memberName;
|
|
57529
|
+
if (everyType(type, (t) => {
|
|
57530
|
+
var _a;
|
|
57531
|
+
return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
57532
|
+
})) {
|
|
57533
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
57534
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
57535
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
57542
57536
|
}
|
|
57543
|
-
|
|
57544
|
-
result = getSignaturesOfStructuredType(reducedType, kind);
|
|
57545
|
-
if (kind === 0 /* Call */ && reducedType.flags & 1048576 /* Union */) {
|
|
57546
|
-
reducedType.arrayFallbackSignatures = result;
|
|
57537
|
+
type.arrayFallbackSignatures = result;
|
|
57547
57538
|
}
|
|
57548
57539
|
return result;
|
|
57549
57540
|
}
|
|
@@ -58541,7 +58532,7 @@ ${lanes.join("\n")}
|
|
|
58541
58532
|
if (constraint) {
|
|
58542
58533
|
constraints = append(constraints, constraint);
|
|
58543
58534
|
}
|
|
58544
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) {
|
|
58535
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && (node === parent2.type || node === parent2.nameType)) {
|
|
58545
58536
|
const mappedType = getTypeFromTypeNode(parent2);
|
|
58546
58537
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
58547
58538
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -61589,6 +61580,7 @@ ${lanes.join("\n")}
|
|
|
61589
61580
|
) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType;
|
|
61590
61581
|
}
|
|
61591
61582
|
function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
61583
|
+
Debug.assert(type.symbol, "anonymous type must have symbol to be instantiated");
|
|
61592
61584
|
const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol);
|
|
61593
61585
|
if (type.objectFlags & 32 /* Mapped */) {
|
|
61594
61586
|
result.declaration = type.declaration;
|
|
@@ -64836,6 +64828,7 @@ ${lanes.join("\n")}
|
|
|
64836
64828
|
const sourceObjectFlags = getObjectFlags(source2);
|
|
64837
64829
|
const targetObjectFlags = getObjectFlags(target2);
|
|
64838
64830
|
if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {
|
|
64831
|
+
Debug.assertEqual(sourceSignatures.length, targetSignatures.length);
|
|
64839
64832
|
for (let i = 0; i < targetSignatures.length; i++) {
|
|
64840
64833
|
const related = signatureRelatedTo(
|
|
64841
64834
|
sourceSignatures[i],
|
|
@@ -69046,6 +69039,9 @@ ${lanes.join("\n")}
|
|
|
69046
69039
|
}
|
|
69047
69040
|
function getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived) {
|
|
69048
69041
|
if (!assumeTrue) {
|
|
69042
|
+
if (type === candidate) {
|
|
69043
|
+
return neverType;
|
|
69044
|
+
}
|
|
69049
69045
|
if (checkDerived) {
|
|
69050
69046
|
return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
|
|
69051
69047
|
}
|
|
@@ -69062,6 +69058,9 @@ ${lanes.join("\n")}
|
|
|
69062
69058
|
if (type.flags & 3 /* AnyOrUnknown */) {
|
|
69063
69059
|
return candidate;
|
|
69064
69060
|
}
|
|
69061
|
+
if (type === candidate) {
|
|
69062
|
+
return candidate;
|
|
69063
|
+
}
|
|
69065
69064
|
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
|
|
69066
69065
|
const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
|
|
69067
69066
|
const narrowedType = mapType(candidate, (c) => {
|
|
@@ -75087,14 +75086,7 @@ ${lanes.join("\n")}
|
|
|
75087
75086
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
75088
75087
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
75089
75088
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
75090
|
-
const result3 = createAnonymousType(
|
|
75091
|
-
/*symbol*/
|
|
75092
|
-
void 0,
|
|
75093
|
-
resolved.members,
|
|
75094
|
-
callSignatures,
|
|
75095
|
-
constructSignatures,
|
|
75096
|
-
resolved.indexInfos
|
|
75097
|
-
);
|
|
75089
|
+
const result3 = createAnonymousType(createSymbol(0 /* None */, "__instantiationExpression" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
75098
75090
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
75099
75091
|
result3.node = node;
|
|
75100
75092
|
return result3;
|
|
@@ -150320,7 +150312,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
150320
150312
|
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
|
|
150321
150313
|
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
|
|
150322
150314
|
Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code,
|
|
150323
|
-
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code
|
|
150315
|
+
Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code,
|
|
150316
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code,
|
|
150317
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code,
|
|
150318
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code,
|
|
150319
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code,
|
|
150320
|
+
Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code,
|
|
150321
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code,
|
|
150322
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code,
|
|
150323
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,
|
|
150324
|
+
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,
|
|
150325
|
+
Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code
|
|
150324
150326
|
];
|
|
150325
150327
|
registerCodeFix({
|
|
150326
150328
|
errorCodes: errorCodes18,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20231108`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-55774-21",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "a03020485671687b499ae5d411decb6260a9b4f3"
|
|
119
119
|
}
|