@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/lib.es5.d.ts
CHANGED
|
@@ -1275,12 +1275,6 @@ interface ReadonlyArray<T> {
|
|
|
1275
1275
|
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
1276
1276
|
*/
|
|
1277
1277
|
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
|
|
1278
|
-
/**
|
|
1279
|
-
* Returns the non-Falsy elements of an array
|
|
1280
|
-
* @param predicate Must be exactly "Boolean"
|
|
1281
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
1282
|
-
*/
|
|
1283
|
-
filter(predicate: BooleanConstructor, thisArg?: any): (T extends false | 0 | "" | null | undefined | 0n ? never : T)[];
|
|
1284
1278
|
/**
|
|
1285
1279
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
1286
1280
|
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
|
@@ -1472,12 +1466,6 @@ interface Array<T> {
|
|
|
1472
1466
|
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
1473
1467
|
*/
|
|
1474
1468
|
filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
|
|
1475
|
-
/**
|
|
1476
|
-
* Returns the non-Falsy elements of an array
|
|
1477
|
-
* @param predicate Must be exactly "Boolean"
|
|
1478
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
1479
|
-
*/
|
|
1480
|
-
filter(predicate: BooleanConstructor, thisArg?: any): (T extends false | 0 | "" | null | undefined | 0n ? never : T)[];
|
|
1481
1469
|
/**
|
|
1482
1470
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
1483
1471
|
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20231108`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -47697,7 +47697,7 @@ function createTypeChecker(host) {
|
|
|
47697
47697
|
return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
|
|
47698
47698
|
}
|
|
47699
47699
|
function toNodeBuilderFlags(flags = 0 /* None */) {
|
|
47700
|
-
return flags &
|
|
47700
|
+
return flags & 848330095 /* NodeBuilderFlagsMask */;
|
|
47701
47701
|
}
|
|
47702
47702
|
function isClassInstanceSide(type) {
|
|
47703
47703
|
return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */));
|
|
@@ -47946,7 +47946,7 @@ function createTypeChecker(host) {
|
|
|
47946
47946
|
}
|
|
47947
47947
|
return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode));
|
|
47948
47948
|
}
|
|
47949
|
-
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */
|
|
47949
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */) {
|
|
47950
47950
|
const name2 = typeParameterToName(type, context);
|
|
47951
47951
|
context.approximateLength += idText(name2).length;
|
|
47952
47952
|
return factory.createTypeReferenceNode(
|
|
@@ -48157,6 +48157,21 @@ function createTypeChecker(host) {
|
|
|
48157
48157
|
const typeId = type2.id;
|
|
48158
48158
|
const symbol = type2.symbol;
|
|
48159
48159
|
if (symbol) {
|
|
48160
|
+
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
48161
|
+
if (isInstantiationExpressionType) {
|
|
48162
|
+
const instantiationExpressionType = type2;
|
|
48163
|
+
const existing = instantiationExpressionType.node;
|
|
48164
|
+
if (isTypeQueryNode(existing) && getTypeFromTypeNode(existing) === type2) {
|
|
48165
|
+
const typeNode = serializeExistingTypeNode(context, existing);
|
|
48166
|
+
if (typeNode) {
|
|
48167
|
+
return typeNode;
|
|
48168
|
+
}
|
|
48169
|
+
}
|
|
48170
|
+
if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) {
|
|
48171
|
+
return createElidedInformationPlaceholder(context);
|
|
48172
|
+
}
|
|
48173
|
+
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
48174
|
+
}
|
|
48160
48175
|
const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */;
|
|
48161
48176
|
if (isJSConstructor(symbol.valueDeclaration)) {
|
|
48162
48177
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -48168,7 +48183,7 @@ function createTypeChecker(host) {
|
|
|
48168
48183
|
false
|
|
48169
48184
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
48170
48185
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
48171
|
-
} else if ((
|
|
48186
|
+
} else if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
48172
48187
|
const typeAlias = getTypeAliasForTypeLiteral(type2);
|
|
48173
48188
|
if (typeAlias) {
|
|
48174
48189
|
return symbolToTypeNode(typeAlias, context, 788968 /* Type */);
|
|
@@ -48179,20 +48194,6 @@ function createTypeChecker(host) {
|
|
|
48179
48194
|
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
48180
48195
|
}
|
|
48181
48196
|
} else {
|
|
48182
|
-
const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
|
|
48183
|
-
if (isInstantiationExpressionType) {
|
|
48184
|
-
const instantiationExpressionType = type2;
|
|
48185
|
-
if (isTypeQueryNode(instantiationExpressionType.node)) {
|
|
48186
|
-
const typeNode = serializeExistingTypeNode(context, instantiationExpressionType.node);
|
|
48187
|
-
if (typeNode) {
|
|
48188
|
-
return typeNode;
|
|
48189
|
-
}
|
|
48190
|
-
}
|
|
48191
|
-
if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) {
|
|
48192
|
-
return createElidedInformationPlaceholder(context);
|
|
48193
|
-
}
|
|
48194
|
-
return visitAndTransformType(type2, createTypeNodeFromObjectType);
|
|
48195
|
-
}
|
|
48196
48197
|
return createTypeNodeFromObjectType(type2);
|
|
48197
48198
|
}
|
|
48198
48199
|
function shouldWriteTypeOfFunctionSymbol() {
|
|
@@ -48746,36 +48747,65 @@ function createTypeChecker(host) {
|
|
|
48746
48747
|
true
|
|
48747
48748
|
)[0];
|
|
48748
48749
|
let cleanup;
|
|
48749
|
-
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) {
|
|
48750
|
-
|
|
48751
|
-
|
|
48752
|
-
|
|
48753
|
-
|
|
48754
|
-
|
|
48755
|
-
if (
|
|
48756
|
-
|
|
48757
|
-
|
|
48758
|
-
|
|
48759
|
-
|
|
48760
|
-
|
|
48761
|
-
|
|
48750
|
+
if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && (some(expandedParams) || some(signature.typeParameters))) {
|
|
48751
|
+
let pushFakeScope2 = function(kind2, addAll) {
|
|
48752
|
+
Debug.assert(context.enclosingDeclaration);
|
|
48753
|
+
let existingFakeScope;
|
|
48754
|
+
if (getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration === kind2) {
|
|
48755
|
+
existingFakeScope = context.enclosingDeclaration;
|
|
48756
|
+
} else if (context.enclosingDeclaration.parent && getNodeLinks(context.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === kind2) {
|
|
48757
|
+
existingFakeScope = context.enclosingDeclaration.parent;
|
|
48758
|
+
}
|
|
48759
|
+
Debug.assertOptionalNode(existingFakeScope, isBlock);
|
|
48760
|
+
const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable();
|
|
48761
|
+
let newLocals;
|
|
48762
|
+
addAll((name, symbol) => {
|
|
48763
|
+
if (!locals.has(name)) {
|
|
48764
|
+
newLocals = append(newLocals, name);
|
|
48765
|
+
locals.set(name, symbol);
|
|
48766
|
+
}
|
|
48767
|
+
});
|
|
48768
|
+
if (!newLocals)
|
|
48769
|
+
return;
|
|
48770
|
+
const oldCleanup = cleanup;
|
|
48771
|
+
function undo() {
|
|
48762
48772
|
forEach(newLocals, (s) => locals.delete(s));
|
|
48763
|
-
|
|
48764
|
-
|
|
48773
|
+
oldCleanup == null ? void 0 : oldCleanup();
|
|
48774
|
+
}
|
|
48765
48775
|
if (existingFakeScope) {
|
|
48766
|
-
cleanup =
|
|
48776
|
+
cleanup = undo;
|
|
48767
48777
|
} else {
|
|
48768
48778
|
const fakeScope = parseNodeFactory.createBlock(emptyArray);
|
|
48769
|
-
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration =
|
|
48779
|
+
getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = kind2;
|
|
48770
48780
|
fakeScope.locals = locals;
|
|
48771
48781
|
const saveEnclosingDeclaration = context.enclosingDeclaration;
|
|
48772
48782
|
setParent(fakeScope, saveEnclosingDeclaration);
|
|
48773
48783
|
context.enclosingDeclaration = fakeScope;
|
|
48774
48784
|
cleanup = () => {
|
|
48775
48785
|
context.enclosingDeclaration = saveEnclosingDeclaration;
|
|
48776
|
-
|
|
48786
|
+
undo();
|
|
48777
48787
|
};
|
|
48778
48788
|
}
|
|
48789
|
+
};
|
|
48790
|
+
var pushFakeScope = pushFakeScope2;
|
|
48791
|
+
pushFakeScope2(
|
|
48792
|
+
"params",
|
|
48793
|
+
(add) => {
|
|
48794
|
+
for (const param of expandedParams) {
|
|
48795
|
+
add(param.escapedName, param);
|
|
48796
|
+
}
|
|
48797
|
+
}
|
|
48798
|
+
);
|
|
48799
|
+
if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) {
|
|
48800
|
+
pushFakeScope2(
|
|
48801
|
+
"typeParams",
|
|
48802
|
+
(add) => {
|
|
48803
|
+
for (const typeParam of signature.typeParameters ?? emptyArray) {
|
|
48804
|
+
const typeParamName = typeParameterToName(typeParam, context).escapedText;
|
|
48805
|
+
add(typeParamName, typeParam.symbol);
|
|
48806
|
+
}
|
|
48807
|
+
}
|
|
48808
|
+
);
|
|
48779
48809
|
}
|
|
48780
48810
|
}
|
|
48781
48811
|
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));
|
|
@@ -49320,7 +49350,7 @@ function createTypeChecker(host) {
|
|
|
49320
49350
|
return identifier;
|
|
49321
49351
|
}
|
|
49322
49352
|
}
|
|
49323
|
-
function
|
|
49353
|
+
function typeParameterShadowsOtherTypeParameterInScope(escapedName, context, type) {
|
|
49324
49354
|
const result = resolveName(
|
|
49325
49355
|
context.enclosingDeclaration,
|
|
49326
49356
|
escapedName,
|
|
@@ -49331,11 +49361,8 @@ function createTypeChecker(host) {
|
|
|
49331
49361
|
/*isUse*/
|
|
49332
49362
|
false
|
|
49333
49363
|
);
|
|
49334
|
-
if (result) {
|
|
49335
|
-
|
|
49336
|
-
return false;
|
|
49337
|
-
}
|
|
49338
|
-
return true;
|
|
49364
|
+
if (result && result.flags & 262144 /* TypeParameter */) {
|
|
49365
|
+
return result !== type.symbol;
|
|
49339
49366
|
}
|
|
49340
49367
|
return false;
|
|
49341
49368
|
}
|
|
@@ -49361,7 +49388,7 @@ function createTypeChecker(host) {
|
|
|
49361
49388
|
const rawtext = result.escapedText;
|
|
49362
49389
|
let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0;
|
|
49363
49390
|
let text = rawtext;
|
|
49364
|
-
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) ||
|
|
49391
|
+
while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsOtherTypeParameterInScope(text, context, type)) {
|
|
49365
49392
|
i++;
|
|
49366
49393
|
text = `${rawtext}_${i}`;
|
|
49367
49394
|
}
|
|
@@ -49372,7 +49399,7 @@ function createTypeChecker(host) {
|
|
|
49372
49399
|
}
|
|
49373
49400
|
(context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i);
|
|
49374
49401
|
(context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result);
|
|
49375
|
-
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(
|
|
49402
|
+
(context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(text);
|
|
49376
49403
|
}
|
|
49377
49404
|
return result;
|
|
49378
49405
|
}
|
|
@@ -49517,7 +49544,10 @@ function createTypeChecker(host) {
|
|
|
49517
49544
|
return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
|
|
49518
49545
|
}
|
|
49519
49546
|
function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) {
|
|
49520
|
-
|
|
49547
|
+
while (getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration) {
|
|
49548
|
+
enclosingDeclaration = enclosingDeclaration.parent;
|
|
49549
|
+
}
|
|
49550
|
+
return enclosingDeclaration;
|
|
49521
49551
|
}
|
|
49522
49552
|
function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
|
|
49523
49553
|
if (!isErrorType(type) && enclosingDeclaration) {
|
|
@@ -49597,7 +49627,7 @@ function createTypeChecker(host) {
|
|
|
49597
49627
|
}
|
|
49598
49628
|
if (isIdentifier(node)) {
|
|
49599
49629
|
const type = getDeclaredTypeOfSymbol(sym);
|
|
49600
|
-
const name = sym.flags & 262144 /* TypeParameter */
|
|
49630
|
+
const name = sym.flags & 262144 /* TypeParameter */ ? typeParameterToName(type, context) : factory.cloneNode(node);
|
|
49601
49631
|
name.symbol = sym;
|
|
49602
49632
|
return { introducesError, node: setEmitFlags(setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) };
|
|
49603
49633
|
}
|
|
@@ -54214,7 +54244,13 @@ function createTypeChecker(host) {
|
|
|
54214
54244
|
const templateModifiers = getMappedTypeModifiers(type);
|
|
54215
54245
|
const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */;
|
|
54216
54246
|
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
|
|
54217
|
-
|
|
54247
|
+
if (isTupleType(modifiersType)) {
|
|
54248
|
+
forEachType(getUnionType(getElementTypes(modifiersType).map((_, i) => getStringLiteralType("" + i))), addMemberForKeyType);
|
|
54249
|
+
} else if (isArrayType(modifiersType)) {
|
|
54250
|
+
addMemberForKeyType(numberType);
|
|
54251
|
+
} else {
|
|
54252
|
+
forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
|
|
54253
|
+
}
|
|
54218
54254
|
} else {
|
|
54219
54255
|
forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
|
|
54220
54256
|
}
|
|
@@ -55010,69 +55046,22 @@ function createTypeChecker(host) {
|
|
|
55010
55046
|
}
|
|
55011
55047
|
return emptyArray;
|
|
55012
55048
|
}
|
|
55013
|
-
function getSignaturesOfType(
|
|
55014
|
-
const
|
|
55015
|
-
|
|
55016
|
-
|
|
55017
|
-
|
|
55018
|
-
let memberName;
|
|
55019
|
-
if (everyType(reducedType, (t) => {
|
|
55020
|
-
var _a2;
|
|
55021
|
-
return !!((_a2 = t.symbol) == null ? void 0 : _a2.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
55022
|
-
})) {
|
|
55023
|
-
if (reducedType.arrayFallbackSignatures) {
|
|
55024
|
-
return reducedType.arrayFallbackSignatures;
|
|
55025
|
-
}
|
|
55026
|
-
const numTypes = reducedType.types.length;
|
|
55027
|
-
const numSigs = (_a = reducedType.types[0].symbol.declarations) == null ? void 0 : _a.length;
|
|
55028
|
-
Debug.assert(numSigs);
|
|
55029
|
-
const returnTypes = new Array(numSigs).fill(
|
|
55030
|
-
/*value*/
|
|
55031
|
-
void 0
|
|
55032
|
-
).map((_, isig) => {
|
|
55033
|
-
const rtset = /* @__PURE__ */ new Set();
|
|
55034
|
-
new Array(numTypes).fill(
|
|
55035
|
-
/*value*/
|
|
55036
|
-
void 0
|
|
55037
|
-
).forEach((_2, itype) => {
|
|
55038
|
-
const callSignatures = reducedType.types[itype].callSignatures ?? getSignaturesOfStructuredType(reducedType.types[itype], 0 /* Call */);
|
|
55039
|
-
if (callSignatures[isig].typeParameters)
|
|
55040
|
-
return;
|
|
55041
|
-
const returnType = callSignatures[isig].resolvedReturnType ?? getReturnTypeOfSignature(callSignatures[isig]);
|
|
55042
|
-
Debug.assert(returnType);
|
|
55043
|
-
rtset.add(returnType);
|
|
55044
|
-
});
|
|
55045
|
-
const art = [];
|
|
55046
|
-
rtset.forEach((rt) => art.push(rt));
|
|
55047
|
-
if (art.length === 0)
|
|
55048
|
-
return void 0;
|
|
55049
|
-
if (art.length === 1)
|
|
55050
|
-
return art[0];
|
|
55051
|
-
return getUnionType(art, 2 /* Subtype */);
|
|
55052
|
-
});
|
|
55053
|
-
const arrayArg = mapType(reducedType, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
55054
|
-
const arrayType = createArrayType(arrayArg, someType(reducedType, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
55055
|
-
const result2 = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
55056
|
-
returnTypes.forEach((returnType, sigidx) => {
|
|
55057
|
-
if (returnType)
|
|
55058
|
-
result2[sigidx].resolvedReturnType = returnTypes[sigidx];
|
|
55059
|
-
});
|
|
55060
|
-
return reducedType.arrayFallbackSignatures = result2;
|
|
55061
|
-
}
|
|
55049
|
+
function getSignaturesOfType(type, kind) {
|
|
55050
|
+
const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
|
|
55051
|
+
if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
|
|
55052
|
+
if (type.arrayFallbackSignatures) {
|
|
55053
|
+
return type.arrayFallbackSignatures;
|
|
55062
55054
|
}
|
|
55063
|
-
|
|
55064
|
-
|
|
55065
|
-
|
|
55066
|
-
|
|
55067
|
-
|
|
55068
|
-
|
|
55069
|
-
|
|
55070
|
-
return
|
|
55055
|
+
let memberName;
|
|
55056
|
+
if (everyType(type, (t) => {
|
|
55057
|
+
var _a;
|
|
55058
|
+
return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
|
|
55059
|
+
})) {
|
|
55060
|
+
const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
|
|
55061
|
+
const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
|
|
55062
|
+
return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
|
|
55071
55063
|
}
|
|
55072
|
-
|
|
55073
|
-
result = getSignaturesOfStructuredType(reducedType, kind);
|
|
55074
|
-
if (kind === 0 /* Call */ && reducedType.flags & 1048576 /* Union */) {
|
|
55075
|
-
reducedType.arrayFallbackSignatures = result;
|
|
55064
|
+
type.arrayFallbackSignatures = result;
|
|
55076
55065
|
}
|
|
55077
55066
|
return result;
|
|
55078
55067
|
}
|
|
@@ -56070,7 +56059,7 @@ function createTypeChecker(host) {
|
|
|
56070
56059
|
if (constraint) {
|
|
56071
56060
|
constraints = append(constraints, constraint);
|
|
56072
56061
|
}
|
|
56073
|
-
} else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 200 /* MappedType */ && node === parent.type) {
|
|
56062
|
+
} else if (type.flags & 262144 /* TypeParameter */ && parent.kind === 200 /* MappedType */ && (node === parent.type || node === parent.nameType)) {
|
|
56074
56063
|
const mappedType = getTypeFromTypeNode(parent);
|
|
56075
56064
|
if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
|
|
56076
56065
|
const typeParameter = getHomomorphicTypeVariable(mappedType);
|
|
@@ -59118,6 +59107,7 @@ function createTypeChecker(host) {
|
|
|
59118
59107
|
) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType;
|
|
59119
59108
|
}
|
|
59120
59109
|
function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
59110
|
+
Debug.assert(type.symbol, "anonymous type must have symbol to be instantiated");
|
|
59121
59111
|
const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol);
|
|
59122
59112
|
if (type.objectFlags & 32 /* Mapped */) {
|
|
59123
59113
|
result.declaration = type.declaration;
|
|
@@ -62365,6 +62355,7 @@ function createTypeChecker(host) {
|
|
|
62365
62355
|
const sourceObjectFlags = getObjectFlags(source2);
|
|
62366
62356
|
const targetObjectFlags = getObjectFlags(target2);
|
|
62367
62357
|
if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {
|
|
62358
|
+
Debug.assertEqual(sourceSignatures.length, targetSignatures.length);
|
|
62368
62359
|
for (let i = 0; i < targetSignatures.length; i++) {
|
|
62369
62360
|
const related = signatureRelatedTo(
|
|
62370
62361
|
sourceSignatures[i],
|
|
@@ -66575,6 +66566,9 @@ function createTypeChecker(host) {
|
|
|
66575
66566
|
}
|
|
66576
66567
|
function getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived) {
|
|
66577
66568
|
if (!assumeTrue) {
|
|
66569
|
+
if (type === candidate) {
|
|
66570
|
+
return neverType;
|
|
66571
|
+
}
|
|
66578
66572
|
if (checkDerived) {
|
|
66579
66573
|
return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
|
|
66580
66574
|
}
|
|
@@ -66591,6 +66585,9 @@ function createTypeChecker(host) {
|
|
|
66591
66585
|
if (type.flags & 3 /* AnyOrUnknown */) {
|
|
66592
66586
|
return candidate;
|
|
66593
66587
|
}
|
|
66588
|
+
if (type === candidate) {
|
|
66589
|
+
return candidate;
|
|
66590
|
+
}
|
|
66594
66591
|
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
|
|
66595
66592
|
const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0;
|
|
66596
66593
|
const narrowedType = mapType(candidate, (c) => {
|
|
@@ -72616,14 +72613,7 @@ function createTypeChecker(host) {
|
|
|
72616
72613
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
72617
72614
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
72618
72615
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
72619
|
-
const result3 = createAnonymousType(
|
|
72620
|
-
/*symbol*/
|
|
72621
|
-
void 0,
|
|
72622
|
-
resolved.members,
|
|
72623
|
-
callSignatures,
|
|
72624
|
-
constructSignatures,
|
|
72625
|
-
resolved.indexInfos
|
|
72626
|
-
);
|
|
72616
|
+
const result3 = createAnonymousType(createSymbol(0 /* None */, "__instantiationExpression" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
72627
72617
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
72628
72618
|
result3.node = node;
|
|
72629
72619
|
return result3;
|