@typescript-deploys/pr-build 5.7.0-pr-60036-8 → 5.7.0-pr-59924-15
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/tsc.js +63 -49
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +67 -49
- package/package.json +1 -1
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.7";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20240925`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -55298,6 +55298,12 @@ function createTypeChecker(host) {
|
|
|
55298
55298
|
if (isBindingPattern(element.name)) {
|
|
55299
55299
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
|
|
55300
55300
|
}
|
|
55301
|
+
if (isBindingPattern(element.parent)) {
|
|
55302
|
+
const contextualType = getContextualPaddingType(element);
|
|
55303
|
+
if (contextualType) {
|
|
55304
|
+
return contextualType;
|
|
55305
|
+
}
|
|
55306
|
+
}
|
|
55301
55307
|
if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {
|
|
55302
55308
|
reportImplicitAny(element, anyType);
|
|
55303
55309
|
}
|
|
@@ -55308,7 +55314,6 @@ function createTypeChecker(host) {
|
|
|
55308
55314
|
let stringIndexInfo;
|
|
55309
55315
|
let objectFlags = 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
|
|
55310
55316
|
forEach(pattern.elements, (e) => {
|
|
55311
|
-
const name = e.propertyName || e.name;
|
|
55312
55317
|
if (e.dotDotDotToken) {
|
|
55313
55318
|
stringIndexInfo = createIndexInfo(
|
|
55314
55319
|
stringType,
|
|
@@ -55318,16 +55323,16 @@ function createTypeChecker(host) {
|
|
|
55318
55323
|
);
|
|
55319
55324
|
return;
|
|
55320
55325
|
}
|
|
55321
|
-
const
|
|
55322
|
-
if (!
|
|
55326
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
55327
|
+
if (!name) {
|
|
55323
55328
|
objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;
|
|
55324
55329
|
return;
|
|
55325
55330
|
}
|
|
55326
|
-
const
|
|
55327
|
-
const
|
|
55328
|
-
const
|
|
55331
|
+
const contextualType = !includePatternInType && isBindingPattern(e.parent) ? getContextualPaddingType(e.parent) : void 0;
|
|
55332
|
+
const paddingSymbol = contextualType && getPropertyOfType(contextualType, name);
|
|
55333
|
+
const flags = 4 /* Property */ | (e.initializer || !includePatternInType && (!paddingSymbol || paddingSymbol.flags & 16777216 /* Optional */) ? 16777216 /* Optional */ : 0);
|
|
55334
|
+
const symbol = createSymbol(flags, name);
|
|
55329
55335
|
symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
|
|
55330
|
-
symbol.links.bindingElement = e;
|
|
55331
55336
|
members.set(symbol.escapedName, symbol);
|
|
55332
55337
|
});
|
|
55333
55338
|
const result = createAnonymousType(
|
|
@@ -71445,11 +71450,8 @@ function createTypeChecker(host) {
|
|
|
71445
71450
|
if (index < 0) return void 0;
|
|
71446
71451
|
return getContextualTypeForElementExpression(parentType, index);
|
|
71447
71452
|
}
|
|
71448
|
-
const
|
|
71449
|
-
|
|
71450
|
-
const text = getPropertyNameFromType(nameType);
|
|
71451
|
-
return getTypeOfPropertyOfType(parentType, text);
|
|
71452
|
-
}
|
|
71453
|
+
const propertyName = getPropertyNameFromBindingElement(declaration);
|
|
71454
|
+
return propertyName && getTypeOfPropertyOfType(parentType, propertyName);
|
|
71453
71455
|
}
|
|
71454
71456
|
function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) {
|
|
71455
71457
|
const parentType = isExpression(declaration.parent) && getContextualType(declaration.parent, contextFlags);
|
|
@@ -72251,6 +72253,33 @@ function createTypeChecker(host) {
|
|
|
72251
72253
|
}
|
|
72252
72254
|
return void 0;
|
|
72253
72255
|
}
|
|
72256
|
+
function getContextualPaddingType(node) {
|
|
72257
|
+
const index = findContextualNode(
|
|
72258
|
+
node,
|
|
72259
|
+
/*includeCaches*/
|
|
72260
|
+
true
|
|
72261
|
+
);
|
|
72262
|
+
if (index >= 0) {
|
|
72263
|
+
return contextualTypes[index];
|
|
72264
|
+
}
|
|
72265
|
+
const { parent } = node;
|
|
72266
|
+
switch (parent.kind) {
|
|
72267
|
+
case 206 /* ObjectBindingPattern */: {
|
|
72268
|
+
const type = getContextualPaddingType(parent);
|
|
72269
|
+
const name = type && getPropertyNameFromBindingElement(node);
|
|
72270
|
+
return name ? getTypeOfPropertyOfType(type, name) : void 0;
|
|
72271
|
+
}
|
|
72272
|
+
case 208 /* BindingElement */: {
|
|
72273
|
+
if (parent.parent.kind === 207 /* ArrayBindingPattern */) {
|
|
72274
|
+
break;
|
|
72275
|
+
}
|
|
72276
|
+
const type = getContextualPaddingType(parent.parent);
|
|
72277
|
+
const name = type && getPropertyNameFromBindingElement(parent);
|
|
72278
|
+
return name ? getTypeOfPropertyOfType(type, name) : void 0;
|
|
72279
|
+
}
|
|
72280
|
+
}
|
|
72281
|
+
return void 0;
|
|
72282
|
+
}
|
|
72254
72283
|
function pushCachedContextualType(node) {
|
|
72255
72284
|
pushContextualType(
|
|
72256
72285
|
node,
|
|
@@ -75645,11 +75674,11 @@ function createTypeChecker(host) {
|
|
|
75645
75674
|
if (funcType === silentNeverType) {
|
|
75646
75675
|
return silentNeverSignature;
|
|
75647
75676
|
}
|
|
75648
|
-
|
|
75677
|
+
const apparentType = getApparentType(funcType);
|
|
75649
75678
|
if (isErrorType(apparentType)) {
|
|
75650
75679
|
return resolveErrorCall(node);
|
|
75651
75680
|
}
|
|
75652
|
-
|
|
75681
|
+
const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);
|
|
75653
75682
|
const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length;
|
|
75654
75683
|
if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) {
|
|
75655
75684
|
if (!isErrorType(funcType) && node.typeArguments) {
|
|
@@ -75677,29 +75706,6 @@ function createTypeChecker(host) {
|
|
|
75677
75706
|
}
|
|
75678
75707
|
return resolveErrorCall(node);
|
|
75679
75708
|
}
|
|
75680
|
-
if (callSignatures.length && node.typeArguments && apparentType.flags & 1048576 /* Union */) {
|
|
75681
|
-
let hasPassingSignature = false;
|
|
75682
|
-
for (const sig of callSignatures) {
|
|
75683
|
-
if (hasCorrectTypeArgumentArity(sig, node.typeArguments)) {
|
|
75684
|
-
hasPassingSignature = true;
|
|
75685
|
-
break;
|
|
75686
|
-
}
|
|
75687
|
-
}
|
|
75688
|
-
if (!hasPassingSignature) {
|
|
75689
|
-
const reduced = getUnionType(apparentType.types, 2 /* Subtype */);
|
|
75690
|
-
const reducedCallSignatures = getSignaturesOfType(reduced, 0 /* Call */);
|
|
75691
|
-
for (const sig of reducedCallSignatures) {
|
|
75692
|
-
if (hasCorrectTypeArgumentArity(sig, node.typeArguments)) {
|
|
75693
|
-
hasPassingSignature = true;
|
|
75694
|
-
break;
|
|
75695
|
-
}
|
|
75696
|
-
}
|
|
75697
|
-
if (hasPassingSignature) {
|
|
75698
|
-
apparentType = reduced;
|
|
75699
|
-
callSignatures = reducedCallSignatures;
|
|
75700
|
-
}
|
|
75701
|
-
}
|
|
75702
|
-
}
|
|
75703
75709
|
if (checkMode & 8 /* SkipGenericFunctions */ && !node.typeArguments && callSignatures.some(isGenericFunctionReturningFunction)) {
|
|
75704
75710
|
skippedGenericFunction(node, checkMode);
|
|
75705
75711
|
return resolvingSignature;
|
|
@@ -79225,33 +79231,41 @@ function createTypeChecker(host) {
|
|
|
79225
79231
|
return type;
|
|
79226
79232
|
}
|
|
79227
79233
|
function padObjectLiteralType(type, pattern) {
|
|
79228
|
-
let
|
|
79234
|
+
let paddableElements;
|
|
79229
79235
|
for (const e of pattern.elements) {
|
|
79230
|
-
|
|
79231
|
-
|
|
79232
|
-
|
|
79233
|
-
missingElements = append(missingElements, e);
|
|
79234
|
-
}
|
|
79236
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
79237
|
+
if (name && (!getPropertyOfType(type, name) || isBindingPattern(e.name))) {
|
|
79238
|
+
paddableElements = append(paddableElements, e);
|
|
79235
79239
|
}
|
|
79236
79240
|
}
|
|
79237
|
-
if (!
|
|
79241
|
+
if (!paddableElements) {
|
|
79238
79242
|
return type;
|
|
79239
79243
|
}
|
|
79240
79244
|
const members = createSymbolTable();
|
|
79241
79245
|
for (const prop of getPropertiesOfObjectType(type)) {
|
|
79242
79246
|
members.set(prop.escapedName, prop);
|
|
79243
79247
|
}
|
|
79244
|
-
|
|
79245
|
-
|
|
79248
|
+
pushContextualType(
|
|
79249
|
+
pattern,
|
|
79250
|
+
type,
|
|
79251
|
+
/*isCache*/
|
|
79252
|
+
true
|
|
79253
|
+
);
|
|
79254
|
+
for (const e of paddableElements) {
|
|
79255
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
79256
|
+
const paddingSymbol = getPropertyOfType(type, name);
|
|
79257
|
+
const isOptional = e.initializer && !paddingSymbol || !members.has(name) || paddingSymbol && paddingSymbol.flags & 16777216 /* Optional */;
|
|
79258
|
+
const symbol = createSymbol(4 /* Property */ | (isOptional || !members.has(name) ? 16777216 /* Optional */ : 0), name);
|
|
79246
79259
|
symbol.links.type = getTypeFromBindingElement(
|
|
79247
79260
|
e,
|
|
79248
79261
|
/*includePatternInType*/
|
|
79249
79262
|
false,
|
|
79250
79263
|
/*reportErrors*/
|
|
79251
|
-
|
|
79264
|
+
true
|
|
79252
79265
|
);
|
|
79253
79266
|
members.set(symbol.escapedName, symbol);
|
|
79254
79267
|
}
|
|
79268
|
+
popContextualType();
|
|
79255
79269
|
const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type));
|
|
79256
79270
|
result.objectFlags = type.objectFlags;
|
|
79257
79271
|
return result;
|
|
@@ -85808,7 +85822,7 @@ function createTypeChecker(host) {
|
|
|
85808
85822
|
} else if (isJSDocMemberName(name)) {
|
|
85809
85823
|
return resolveJSDocMemberName(name);
|
|
85810
85824
|
}
|
|
85811
|
-
} else if (isTypeReferenceIdentifier(name)) {
|
|
85825
|
+
} else if (isEntityName(name) && isTypeReferenceIdentifier(name)) {
|
|
85812
85826
|
const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */;
|
|
85813
85827
|
const symbol = resolveEntityName(
|
|
85814
85828
|
name,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -8773,7 +8773,6 @@ declare namespace ts {
|
|
|
8773
8773
|
function isJSDocCommentContainingNode(node: Node): boolean;
|
|
8774
8774
|
function isSetAccessor(node: Node): node is SetAccessorDeclaration;
|
|
8775
8775
|
function isGetAccessor(node: Node): node is GetAccessorDeclaration;
|
|
8776
|
-
/** True if has initializer node attached to it. */
|
|
8777
8776
|
function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
|
|
8778
8777
|
function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
|
|
8779
8778
|
function isStringLiteralLike(node: Node | FileReference): node is StringLiteralLike;
|
package/lib/typescript.js
CHANGED
|
@@ -2270,7 +2270,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2270
2270
|
|
|
2271
2271
|
// src/compiler/corePublic.ts
|
|
2272
2272
|
var versionMajorMinor = "5.7";
|
|
2273
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2273
|
+
var version = `${versionMajorMinor}.0-insiders.20240925`;
|
|
2274
2274
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2275
2275
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2276
2276
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -59894,6 +59894,12 @@ function createTypeChecker(host) {
|
|
|
59894
59894
|
if (isBindingPattern(element.name)) {
|
|
59895
59895
|
return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
|
|
59896
59896
|
}
|
|
59897
|
+
if (isBindingPattern(element.parent)) {
|
|
59898
|
+
const contextualType = getContextualPaddingType(element);
|
|
59899
|
+
if (contextualType) {
|
|
59900
|
+
return contextualType;
|
|
59901
|
+
}
|
|
59902
|
+
}
|
|
59897
59903
|
if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) {
|
|
59898
59904
|
reportImplicitAny(element, anyType);
|
|
59899
59905
|
}
|
|
@@ -59904,7 +59910,6 @@ function createTypeChecker(host) {
|
|
|
59904
59910
|
let stringIndexInfo;
|
|
59905
59911
|
let objectFlags = 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
|
|
59906
59912
|
forEach(pattern.elements, (e) => {
|
|
59907
|
-
const name = e.propertyName || e.name;
|
|
59908
59913
|
if (e.dotDotDotToken) {
|
|
59909
59914
|
stringIndexInfo = createIndexInfo(
|
|
59910
59915
|
stringType,
|
|
@@ -59914,16 +59919,16 @@ function createTypeChecker(host) {
|
|
|
59914
59919
|
);
|
|
59915
59920
|
return;
|
|
59916
59921
|
}
|
|
59917
|
-
const
|
|
59918
|
-
if (!
|
|
59922
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
59923
|
+
if (!name) {
|
|
59919
59924
|
objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;
|
|
59920
59925
|
return;
|
|
59921
59926
|
}
|
|
59922
|
-
const
|
|
59923
|
-
const
|
|
59924
|
-
const
|
|
59927
|
+
const contextualType = !includePatternInType && isBindingPattern(e.parent) ? getContextualPaddingType(e.parent) : void 0;
|
|
59928
|
+
const paddingSymbol = contextualType && getPropertyOfType(contextualType, name);
|
|
59929
|
+
const flags = 4 /* Property */ | (e.initializer || !includePatternInType && (!paddingSymbol || paddingSymbol.flags & 16777216 /* Optional */) ? 16777216 /* Optional */ : 0);
|
|
59930
|
+
const symbol = createSymbol(flags, name);
|
|
59925
59931
|
symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2);
|
|
59926
|
-
symbol.links.bindingElement = e;
|
|
59927
59932
|
members.set(symbol.escapedName, symbol);
|
|
59928
59933
|
});
|
|
59929
59934
|
const result = createAnonymousType(
|
|
@@ -76041,11 +76046,8 @@ function createTypeChecker(host) {
|
|
|
76041
76046
|
if (index < 0) return void 0;
|
|
76042
76047
|
return getContextualTypeForElementExpression(parentType, index);
|
|
76043
76048
|
}
|
|
76044
|
-
const
|
|
76045
|
-
|
|
76046
|
-
const text = getPropertyNameFromType(nameType);
|
|
76047
|
-
return getTypeOfPropertyOfType(parentType, text);
|
|
76048
|
-
}
|
|
76049
|
+
const propertyName = getPropertyNameFromBindingElement(declaration);
|
|
76050
|
+
return propertyName && getTypeOfPropertyOfType(parentType, propertyName);
|
|
76049
76051
|
}
|
|
76050
76052
|
function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) {
|
|
76051
76053
|
const parentType = isExpression(declaration.parent) && getContextualType2(declaration.parent, contextFlags);
|
|
@@ -76847,6 +76849,33 @@ function createTypeChecker(host) {
|
|
|
76847
76849
|
}
|
|
76848
76850
|
return void 0;
|
|
76849
76851
|
}
|
|
76852
|
+
function getContextualPaddingType(node) {
|
|
76853
|
+
const index = findContextualNode(
|
|
76854
|
+
node,
|
|
76855
|
+
/*includeCaches*/
|
|
76856
|
+
true
|
|
76857
|
+
);
|
|
76858
|
+
if (index >= 0) {
|
|
76859
|
+
return contextualTypes[index];
|
|
76860
|
+
}
|
|
76861
|
+
const { parent: parent2 } = node;
|
|
76862
|
+
switch (parent2.kind) {
|
|
76863
|
+
case 206 /* ObjectBindingPattern */: {
|
|
76864
|
+
const type = getContextualPaddingType(parent2);
|
|
76865
|
+
const name = type && getPropertyNameFromBindingElement(node);
|
|
76866
|
+
return name ? getTypeOfPropertyOfType(type, name) : void 0;
|
|
76867
|
+
}
|
|
76868
|
+
case 208 /* BindingElement */: {
|
|
76869
|
+
if (parent2.parent.kind === 207 /* ArrayBindingPattern */) {
|
|
76870
|
+
break;
|
|
76871
|
+
}
|
|
76872
|
+
const type = getContextualPaddingType(parent2.parent);
|
|
76873
|
+
const name = type && getPropertyNameFromBindingElement(parent2);
|
|
76874
|
+
return name ? getTypeOfPropertyOfType(type, name) : void 0;
|
|
76875
|
+
}
|
|
76876
|
+
}
|
|
76877
|
+
return void 0;
|
|
76878
|
+
}
|
|
76850
76879
|
function pushCachedContextualType(node) {
|
|
76851
76880
|
pushContextualType(
|
|
76852
76881
|
node,
|
|
@@ -80241,11 +80270,11 @@ function createTypeChecker(host) {
|
|
|
80241
80270
|
if (funcType === silentNeverType) {
|
|
80242
80271
|
return silentNeverSignature;
|
|
80243
80272
|
}
|
|
80244
|
-
|
|
80273
|
+
const apparentType = getApparentType(funcType);
|
|
80245
80274
|
if (isErrorType(apparentType)) {
|
|
80246
80275
|
return resolveErrorCall(node);
|
|
80247
80276
|
}
|
|
80248
|
-
|
|
80277
|
+
const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */);
|
|
80249
80278
|
const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length;
|
|
80250
80279
|
if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) {
|
|
80251
80280
|
if (!isErrorType(funcType) && node.typeArguments) {
|
|
@@ -80273,29 +80302,6 @@ function createTypeChecker(host) {
|
|
|
80273
80302
|
}
|
|
80274
80303
|
return resolveErrorCall(node);
|
|
80275
80304
|
}
|
|
80276
|
-
if (callSignatures.length && node.typeArguments && apparentType.flags & 1048576 /* Union */) {
|
|
80277
|
-
let hasPassingSignature = false;
|
|
80278
|
-
for (const sig of callSignatures) {
|
|
80279
|
-
if (hasCorrectTypeArgumentArity(sig, node.typeArguments)) {
|
|
80280
|
-
hasPassingSignature = true;
|
|
80281
|
-
break;
|
|
80282
|
-
}
|
|
80283
|
-
}
|
|
80284
|
-
if (!hasPassingSignature) {
|
|
80285
|
-
const reduced = getUnionType(apparentType.types, 2 /* Subtype */);
|
|
80286
|
-
const reducedCallSignatures = getSignaturesOfType(reduced, 0 /* Call */);
|
|
80287
|
-
for (const sig of reducedCallSignatures) {
|
|
80288
|
-
if (hasCorrectTypeArgumentArity(sig, node.typeArguments)) {
|
|
80289
|
-
hasPassingSignature = true;
|
|
80290
|
-
break;
|
|
80291
|
-
}
|
|
80292
|
-
}
|
|
80293
|
-
if (hasPassingSignature) {
|
|
80294
|
-
apparentType = reduced;
|
|
80295
|
-
callSignatures = reducedCallSignatures;
|
|
80296
|
-
}
|
|
80297
|
-
}
|
|
80298
|
-
}
|
|
80299
80305
|
if (checkMode & 8 /* SkipGenericFunctions */ && !node.typeArguments && callSignatures.some(isGenericFunctionReturningFunction)) {
|
|
80300
80306
|
skippedGenericFunction(node, checkMode);
|
|
80301
80307
|
return resolvingSignature;
|
|
@@ -83821,33 +83827,41 @@ function createTypeChecker(host) {
|
|
|
83821
83827
|
return type;
|
|
83822
83828
|
}
|
|
83823
83829
|
function padObjectLiteralType(type, pattern) {
|
|
83824
|
-
let
|
|
83830
|
+
let paddableElements;
|
|
83825
83831
|
for (const e of pattern.elements) {
|
|
83826
|
-
|
|
83827
|
-
|
|
83828
|
-
|
|
83829
|
-
missingElements = append(missingElements, e);
|
|
83830
|
-
}
|
|
83832
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
83833
|
+
if (name && (!getPropertyOfType(type, name) || isBindingPattern(e.name))) {
|
|
83834
|
+
paddableElements = append(paddableElements, e);
|
|
83831
83835
|
}
|
|
83832
83836
|
}
|
|
83833
|
-
if (!
|
|
83837
|
+
if (!paddableElements) {
|
|
83834
83838
|
return type;
|
|
83835
83839
|
}
|
|
83836
83840
|
const members = createSymbolTable();
|
|
83837
83841
|
for (const prop of getPropertiesOfObjectType(type)) {
|
|
83838
83842
|
members.set(prop.escapedName, prop);
|
|
83839
83843
|
}
|
|
83840
|
-
|
|
83841
|
-
|
|
83844
|
+
pushContextualType(
|
|
83845
|
+
pattern,
|
|
83846
|
+
type,
|
|
83847
|
+
/*isCache*/
|
|
83848
|
+
true
|
|
83849
|
+
);
|
|
83850
|
+
for (const e of paddableElements) {
|
|
83851
|
+
const name = getPropertyNameFromBindingElement(e);
|
|
83852
|
+
const paddingSymbol = getPropertyOfType(type, name);
|
|
83853
|
+
const isOptional = e.initializer && !paddingSymbol || !members.has(name) || paddingSymbol && paddingSymbol.flags & 16777216 /* Optional */;
|
|
83854
|
+
const symbol = createSymbol(4 /* Property */ | (isOptional || !members.has(name) ? 16777216 /* Optional */ : 0), name);
|
|
83842
83855
|
symbol.links.type = getTypeFromBindingElement(
|
|
83843
83856
|
e,
|
|
83844
83857
|
/*includePatternInType*/
|
|
83845
83858
|
false,
|
|
83846
83859
|
/*reportErrors*/
|
|
83847
|
-
|
|
83860
|
+
true
|
|
83848
83861
|
);
|
|
83849
83862
|
members.set(symbol.escapedName, symbol);
|
|
83850
83863
|
}
|
|
83864
|
+
popContextualType();
|
|
83851
83865
|
const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type));
|
|
83852
83866
|
result.objectFlags = type.objectFlags;
|
|
83853
83867
|
return result;
|
|
@@ -90404,7 +90418,7 @@ function createTypeChecker(host) {
|
|
|
90404
90418
|
} else if (isJSDocMemberName(name)) {
|
|
90405
90419
|
return resolveJSDocMemberName(name);
|
|
90406
90420
|
}
|
|
90407
|
-
} else if (isTypeReferenceIdentifier(name)) {
|
|
90421
|
+
} else if (isEntityName(name) && isTypeReferenceIdentifier(name)) {
|
|
90408
90422
|
const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */;
|
|
90409
90423
|
const symbol = resolveEntityName(
|
|
90410
90424
|
name,
|
|
@@ -149780,6 +149794,7 @@ var SymbolObject = class {
|
|
|
149780
149794
|
if (context) {
|
|
149781
149795
|
if (isGetAccessor(context)) {
|
|
149782
149796
|
if (!this.contextualGetAccessorDocumentationComment) {
|
|
149797
|
+
this.contextualGetAccessorDocumentationComment = emptyArray;
|
|
149783
149798
|
this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker);
|
|
149784
149799
|
}
|
|
149785
149800
|
if (length(this.contextualGetAccessorDocumentationComment)) {
|
|
@@ -149788,6 +149803,7 @@ var SymbolObject = class {
|
|
|
149788
149803
|
}
|
|
149789
149804
|
if (isSetAccessor(context)) {
|
|
149790
149805
|
if (!this.contextualSetAccessorDocumentationComment) {
|
|
149806
|
+
this.contextualSetAccessorDocumentationComment = emptyArray;
|
|
149791
149807
|
this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker);
|
|
149792
149808
|
}
|
|
149793
149809
|
if (length(this.contextualSetAccessorDocumentationComment)) {
|
|
@@ -149808,6 +149824,7 @@ var SymbolObject = class {
|
|
|
149808
149824
|
if (context) {
|
|
149809
149825
|
if (isGetAccessor(context)) {
|
|
149810
149826
|
if (!this.contextualGetAccessorTags) {
|
|
149827
|
+
this.contextualGetAccessorTags = emptyArray;
|
|
149811
149828
|
this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker);
|
|
149812
149829
|
}
|
|
149813
149830
|
if (length(this.contextualGetAccessorTags)) {
|
|
@@ -149816,6 +149833,7 @@ var SymbolObject = class {
|
|
|
149816
149833
|
}
|
|
149817
149834
|
if (isSetAccessor(context)) {
|
|
149818
149835
|
if (!this.contextualSetAccessorTags) {
|
|
149836
|
+
this.contextualSetAccessorTags = emptyArray;
|
|
149819
149837
|
this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker);
|
|
149820
149838
|
}
|
|
149821
149839
|
if (length(this.contextualSetAccessorTags)) {
|
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.7.0-pr-
|
|
5
|
+
"version": "5.7.0-pr-59924-15",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|