@typescript-deploys/pr-build 5.3.0-pr-55291-6 → 5.3.0-pr-54960-5

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 CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.3";
21
- var version = `${versionMajorMinor}.0-insiders.20230817`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230819`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -54740,7 +54740,7 @@ function createTypeChecker(host) {
54740
54740
  }
54741
54741
  const iife = getImmediatelyInvokedFunctionExpression(node.parent);
54742
54742
  if (iife) {
54743
- return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length;
54743
+ return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
54744
54744
  }
54745
54745
  return false;
54746
54746
  }
@@ -64463,7 +64463,7 @@ function createTypeChecker(host) {
64463
64463
  const resolved = resolveStructuredTypeMembers(type);
64464
64464
  return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
64465
64465
  }
64466
- function getTypeFacts(type, strictTruthy) {
64466
+ function getTypeFacts(type) {
64467
64467
  if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
64468
64468
  type = getBaseConstraintOfType(type) || unknownType;
64469
64469
  }
@@ -64493,7 +64493,7 @@ function createTypeChecker(host) {
64493
64493
  return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
64494
64494
  }
64495
64495
  if (flags & 528 /* BooleanLike */) {
64496
- return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
64496
+ return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
64497
64497
  }
64498
64498
  if (flags & 524288 /* Object */) {
64499
64499
  return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
@@ -64517,7 +64517,7 @@ function createTypeChecker(host) {
64517
64517
  return 0 /* None */;
64518
64518
  }
64519
64519
  if (flags & 1048576 /* Union */) {
64520
- return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
64520
+ return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
64521
64521
  }
64522
64522
  if (flags & 2097152 /* Intersection */) {
64523
64523
  return getIntersectionTypeFacts(type);
@@ -64537,8 +64537,8 @@ function createTypeChecker(host) {
64537
64537
  }
64538
64538
  return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
64539
64539
  }
64540
- function getTypeWithFacts(type, include, strictTruthy) {
64541
- return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
64540
+ function getTypeWithFacts(type, include) {
64541
+ return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
64542
64542
  }
64543
64543
  function getAdjustedTypeWithFacts(type, facts) {
64544
64544
  const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
@@ -65598,12 +65598,7 @@ function createTypeChecker(host) {
65598
65598
  }
65599
65599
  const access = getDiscriminantPropertyAccess(expr, type);
65600
65600
  if (access) {
65601
- return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
65602
- t,
65603
- assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
65604
- /*strictTruthy*/
65605
- true
65606
- ));
65601
+ return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */));
65607
65602
  }
65608
65603
  return type;
65609
65604
  }
@@ -72045,14 +72040,14 @@ function createTypeChecker(host) {
72045
72040
  return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
72046
72041
  }
72047
72042
  function getTypeOfParameter(symbol) {
72048
- const type = getTypeOfSymbol(symbol);
72049
- if (strictNullChecks) {
72050
- const declaration = symbol.valueDeclaration;
72051
- if (declaration && hasInitializer(declaration)) {
72052
- return getOptionalType(type);
72053
- }
72054
- }
72055
- return type;
72043
+ const declaration = symbol.valueDeclaration;
72044
+ return addOptionality(
72045
+ getTypeOfSymbol(symbol),
72046
+ /*isProperty*/
72047
+ false,
72048
+ /*isOptional*/
72049
+ !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
72050
+ );
72056
72051
  }
72057
72052
  function getTupleElementLabel(d, index, restParameterName = "arg") {
72058
72053
  if (!d) {
@@ -72319,23 +72314,29 @@ function createTypeChecker(host) {
72319
72314
  assignParameterType(parameter);
72320
72315
  }
72321
72316
  }
72322
- function assignParameterType(parameter, type) {
72317
+ function assignParameterType(parameter, contextualType) {
72323
72318
  const links = getSymbolLinks(parameter);
72324
72319
  if (!links.type) {
72325
72320
  const declaration = parameter.valueDeclaration;
72326
- links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration(
72327
- declaration,
72328
- /*reportErrors*/
72329
- true
72330
- ) : getTypeOfSymbol(parameter));
72321
+ links.type = addOptionality(
72322
+ contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
72323
+ declaration,
72324
+ /*reportErrors*/
72325
+ true
72326
+ ) : getTypeOfSymbol(parameter)),
72327
+ /*isProperty*/
72328
+ false,
72329
+ /*isOptional*/
72330
+ declaration && !declaration.initializer && isOptionalDeclaration(declaration)
72331
+ );
72331
72332
  if (declaration && declaration.name.kind !== 80 /* Identifier */) {
72332
72333
  if (links.type === unknownType) {
72333
72334
  links.type = getTypeFromBindingPattern(declaration.name);
72334
72335
  }
72335
72336
  assignBindingElementTypes(declaration.name, links.type);
72336
72337
  }
72337
- } else if (type) {
72338
- Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type");
72338
+ } else if (contextualType) {
72339
+ Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
72339
72340
  }
72340
72341
  }
72341
72342
  function assignBindingElementTypes(pattern, parentType) {
@@ -83700,7 +83701,7 @@ function createTypeChecker(host) {
83700
83701
  }
83701
83702
  function getEffectivePropertyNameForPropertyNameNode(node) {
83702
83703
  const name = getPropertyNameForPropertyNameNode(node);
83703
- return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0;
83704
+ return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0;
83704
83705
  }
83705
83706
  function getCombinedModifierFlagsCached(node) {
83706
83707
  if (lastGetCombinedModifierFlagsNode === node) {
package/lib/tsserver.js CHANGED
@@ -2333,7 +2333,7 @@ module.exports = __toCommonJS(server_exports);
2333
2333
 
2334
2334
  // src/compiler/corePublic.ts
2335
2335
  var versionMajorMinor = "5.3";
2336
- var version = `${versionMajorMinor}.0-insiders.20230817`;
2336
+ var version = `${versionMajorMinor}.0-insiders.20230819`;
2337
2337
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2338
2338
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2339
2339
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -59448,7 +59448,7 @@ function createTypeChecker(host) {
59448
59448
  }
59449
59449
  const iife = getImmediatelyInvokedFunctionExpression(node.parent);
59450
59450
  if (iife) {
59451
- return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length;
59451
+ return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
59452
59452
  }
59453
59453
  return false;
59454
59454
  }
@@ -69171,7 +69171,7 @@ function createTypeChecker(host) {
69171
69171
  const resolved = resolveStructuredTypeMembers(type);
69172
69172
  return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
69173
69173
  }
69174
- function getTypeFacts(type, strictTruthy) {
69174
+ function getTypeFacts(type) {
69175
69175
  if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
69176
69176
  type = getBaseConstraintOfType(type) || unknownType;
69177
69177
  }
@@ -69201,7 +69201,7 @@ function createTypeChecker(host) {
69201
69201
  return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
69202
69202
  }
69203
69203
  if (flags & 528 /* BooleanLike */) {
69204
- return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
69204
+ return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
69205
69205
  }
69206
69206
  if (flags & 524288 /* Object */) {
69207
69207
  return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
@@ -69225,7 +69225,7 @@ function createTypeChecker(host) {
69225
69225
  return 0 /* None */;
69226
69226
  }
69227
69227
  if (flags & 1048576 /* Union */) {
69228
- return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
69228
+ return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
69229
69229
  }
69230
69230
  if (flags & 2097152 /* Intersection */) {
69231
69231
  return getIntersectionTypeFacts(type);
@@ -69245,8 +69245,8 @@ function createTypeChecker(host) {
69245
69245
  }
69246
69246
  return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
69247
69247
  }
69248
- function getTypeWithFacts(type, include, strictTruthy) {
69249
- return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
69248
+ function getTypeWithFacts(type, include) {
69249
+ return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
69250
69250
  }
69251
69251
  function getAdjustedTypeWithFacts(type, facts) {
69252
69252
  const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
@@ -70306,12 +70306,7 @@ function createTypeChecker(host) {
70306
70306
  }
70307
70307
  const access = getDiscriminantPropertyAccess(expr, type);
70308
70308
  if (access) {
70309
- return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
70310
- t,
70311
- assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
70312
- /*strictTruthy*/
70313
- true
70314
- ));
70309
+ return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */));
70315
70310
  }
70316
70311
  return type;
70317
70312
  }
@@ -76753,14 +76748,14 @@ function createTypeChecker(host) {
76753
76748
  return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
76754
76749
  }
76755
76750
  function getTypeOfParameter(symbol) {
76756
- const type = getTypeOfSymbol(symbol);
76757
- if (strictNullChecks) {
76758
- const declaration = symbol.valueDeclaration;
76759
- if (declaration && hasInitializer(declaration)) {
76760
- return getOptionalType(type);
76761
- }
76762
- }
76763
- return type;
76751
+ const declaration = symbol.valueDeclaration;
76752
+ return addOptionality(
76753
+ getTypeOfSymbol(symbol),
76754
+ /*isProperty*/
76755
+ false,
76756
+ /*isOptional*/
76757
+ !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
76758
+ );
76764
76759
  }
76765
76760
  function getTupleElementLabel(d, index, restParameterName = "arg") {
76766
76761
  if (!d) {
@@ -77027,23 +77022,29 @@ function createTypeChecker(host) {
77027
77022
  assignParameterType(parameter);
77028
77023
  }
77029
77024
  }
77030
- function assignParameterType(parameter, type) {
77025
+ function assignParameterType(parameter, contextualType) {
77031
77026
  const links = getSymbolLinks(parameter);
77032
77027
  if (!links.type) {
77033
77028
  const declaration = parameter.valueDeclaration;
77034
- links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration(
77035
- declaration,
77036
- /*reportErrors*/
77037
- true
77038
- ) : getTypeOfSymbol(parameter));
77029
+ links.type = addOptionality(
77030
+ contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
77031
+ declaration,
77032
+ /*reportErrors*/
77033
+ true
77034
+ ) : getTypeOfSymbol(parameter)),
77035
+ /*isProperty*/
77036
+ false,
77037
+ /*isOptional*/
77038
+ declaration && !declaration.initializer && isOptionalDeclaration(declaration)
77039
+ );
77039
77040
  if (declaration && declaration.name.kind !== 80 /* Identifier */) {
77040
77041
  if (links.type === unknownType) {
77041
77042
  links.type = getTypeFromBindingPattern(declaration.name);
77042
77043
  }
77043
77044
  assignBindingElementTypes(declaration.name, links.type);
77044
77045
  }
77045
- } else if (type) {
77046
- Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type");
77046
+ } else if (contextualType) {
77047
+ Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
77047
77048
  }
77048
77049
  }
77049
77050
  function assignBindingElementTypes(pattern, parentType) {
@@ -88408,7 +88409,7 @@ function createTypeChecker(host) {
88408
88409
  }
88409
88410
  function getEffectivePropertyNameForPropertyNameNode(node) {
88410
88411
  const name = getPropertyNameForPropertyNameNode(node);
88411
- return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0;
88412
+ return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0;
88412
88413
  }
88413
88414
  function getCombinedModifierFlagsCached(node) {
88414
88415
  if (lastGetCombinedModifierFlagsNode === node) {
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.3";
38
- version = `${versionMajorMinor}.0-insiders.20230817`;
38
+ version = `${versionMajorMinor}.0-insiders.20230819`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -57209,7 +57209,7 @@ ${lanes.join("\n")}
57209
57209
  }
57210
57210
  const iife = getImmediatelyInvokedFunctionExpression(node.parent);
57211
57211
  if (iife) {
57212
- return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length;
57212
+ return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length;
57213
57213
  }
57214
57214
  return false;
57215
57215
  }
@@ -66932,7 +66932,7 @@ ${lanes.join("\n")}
66932
66932
  const resolved = resolveStructuredTypeMembers(type);
66933
66933
  return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
66934
66934
  }
66935
- function getTypeFacts(type, strictTruthy) {
66935
+ function getTypeFacts(type) {
66936
66936
  if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
66937
66937
  type = getBaseConstraintOfType(type) || unknownType;
66938
66938
  }
@@ -66962,7 +66962,7 @@ ${lanes.join("\n")}
66962
66962
  return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */;
66963
66963
  }
66964
66964
  if (flags & 528 /* BooleanLike */) {
66965
- return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : strictTruthy ? 16774920 /* TrueFacts */ & ~8388608 /* Falsy */ : 16774920 /* TrueFacts */;
66965
+ return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
66966
66966
  }
66967
66967
  if (flags & 524288 /* Object */) {
66968
66968
  return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
@@ -66986,7 +66986,7 @@ ${lanes.join("\n")}
66986
66986
  return 0 /* None */;
66987
66987
  }
66988
66988
  if (flags & 1048576 /* Union */) {
66989
- return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t, strictTruthy), 0 /* None */);
66989
+ return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
66990
66990
  }
66991
66991
  if (flags & 2097152 /* Intersection */) {
66992
66992
  return getIntersectionTypeFacts(type);
@@ -67006,8 +67006,8 @@ ${lanes.join("\n")}
67006
67006
  }
67007
67007
  return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
67008
67008
  }
67009
- function getTypeWithFacts(type, include, strictTruthy) {
67010
- return filterType(type, (t) => (getTypeFacts(t, strictTruthy) & include) !== 0);
67009
+ function getTypeWithFacts(type, include) {
67010
+ return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
67011
67011
  }
67012
67012
  function getAdjustedTypeWithFacts(type, facts) {
67013
67013
  const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
@@ -68067,12 +68067,7 @@ ${lanes.join("\n")}
68067
68067
  }
68068
68068
  const access = getDiscriminantPropertyAccess(expr, type);
68069
68069
  if (access) {
68070
- return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(
68071
- t,
68072
- assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */,
68073
- /*strictTruthy*/
68074
- true
68075
- ));
68070
+ return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */));
68076
68071
  }
68077
68072
  return type;
68078
68073
  }
@@ -74514,14 +74509,14 @@ ${lanes.join("\n")}
74514
74509
  return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
74515
74510
  }
74516
74511
  function getTypeOfParameter(symbol) {
74517
- const type = getTypeOfSymbol(symbol);
74518
- if (strictNullChecks) {
74519
- const declaration = symbol.valueDeclaration;
74520
- if (declaration && hasInitializer(declaration)) {
74521
- return getOptionalType(type);
74522
- }
74523
- }
74524
- return type;
74512
+ const declaration = symbol.valueDeclaration;
74513
+ return addOptionality(
74514
+ getTypeOfSymbol(symbol),
74515
+ /*isProperty*/
74516
+ false,
74517
+ /*isOptional*/
74518
+ !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration))
74519
+ );
74525
74520
  }
74526
74521
  function getTupleElementLabel(d, index, restParameterName = "arg") {
74527
74522
  if (!d) {
@@ -74788,23 +74783,29 @@ ${lanes.join("\n")}
74788
74783
  assignParameterType(parameter);
74789
74784
  }
74790
74785
  }
74791
- function assignParameterType(parameter, type) {
74786
+ function assignParameterType(parameter, contextualType) {
74792
74787
  const links = getSymbolLinks(parameter);
74793
74788
  if (!links.type) {
74794
74789
  const declaration = parameter.valueDeclaration;
74795
- links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration(
74796
- declaration,
74797
- /*reportErrors*/
74798
- true
74799
- ) : getTypeOfSymbol(parameter));
74790
+ links.type = addOptionality(
74791
+ contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration(
74792
+ declaration,
74793
+ /*reportErrors*/
74794
+ true
74795
+ ) : getTypeOfSymbol(parameter)),
74796
+ /*isProperty*/
74797
+ false,
74798
+ /*isOptional*/
74799
+ declaration && !declaration.initializer && isOptionalDeclaration(declaration)
74800
+ );
74800
74801
  if (declaration && declaration.name.kind !== 80 /* Identifier */) {
74801
74802
  if (links.type === unknownType) {
74802
74803
  links.type = getTypeFromBindingPattern(declaration.name);
74803
74804
  }
74804
74805
  assignBindingElementTypes(declaration.name, links.type);
74805
74806
  }
74806
- } else if (type) {
74807
- Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type");
74807
+ } else if (contextualType) {
74808
+ Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type");
74808
74809
  }
74809
74810
  }
74810
74811
  function assignBindingElementTypes(pattern, parentType) {
@@ -86169,7 +86170,7 @@ ${lanes.join("\n")}
86169
86170
  }
86170
86171
  function getEffectivePropertyNameForPropertyNameNode(node) {
86171
86172
  const name = getPropertyNameForPropertyNameNode(node);
86172
- return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0;
86173
+ return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0;
86173
86174
  }
86174
86175
  function getCombinedModifierFlagsCached(node) {
86175
86176
  if (lastGetCombinedModifierFlagsNode === node) {
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.3";
57
- var version = `${versionMajorMinor}.0-insiders.20230817`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230819`;
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.3.0-pr-55291-6",
5
+ "version": "5.3.0-pr-54960-5",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -116,5 +116,5 @@
116
116
  "node": "20.1.0",
117
117
  "npm": "8.19.4"
118
118
  },
119
- "gitHead": "92a0ae5c70e8053b382ed5242c49f738c455b804"
119
+ "gitHead": "98e710847f6e28b395b7fc722bf7b8d555e0b651"
120
120
  }