@typescript-deploys/pr-build 5.4.0-pr-56753-16 → 5.4.0-pr-48838-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/tsc.js CHANGED
@@ -52683,7 +52683,7 @@ function createTypeChecker(host) {
52683
52683
  /*reportErrors*/
52684
52684
  false
52685
52685
  ) : unknownType;
52686
- return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, reportErrors2 ? 0 /* Normal */ : 1 /* Contextual */, contextualType)));
52686
+ return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
52687
52687
  }
52688
52688
  if (isBindingPattern(element.name)) {
52689
52689
  return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
@@ -52817,18 +52817,18 @@ function createTypeChecker(host) {
52817
52817
  }
52818
52818
  return false;
52819
52819
  }
52820
- function getTypeOfVariableOrParameterOrProperty(symbol, checkMode) {
52820
+ function getTypeOfVariableOrParameterOrProperty(symbol) {
52821
52821
  const links = getSymbolLinks(symbol);
52822
52822
  if (!links.type) {
52823
- const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode);
52824
- if (!links.type && !isParameterOfContextSensitiveSignature(symbol) && !checkMode) {
52823
+ const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
52824
+ if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
52825
52825
  links.type = type;
52826
52826
  }
52827
52827
  return type;
52828
52828
  }
52829
52829
  return links.type;
52830
52830
  }
52831
- function getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode) {
52831
+ function getTypeOfVariableOrParameterOrPropertyWorker(symbol) {
52832
52832
  if (symbol.flags & 4194304 /* Prototype */) {
52833
52833
  return getTypeOfPrototypeProperty(symbol);
52834
52834
  }
@@ -52866,9 +52866,6 @@ function createTypeChecker(host) {
52866
52866
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
52867
52867
  return getTypeOfFuncClassEnumModule(symbol);
52868
52868
  }
52869
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
52870
- return errorType;
52871
- }
52872
52869
  return reportCircularityError(symbol);
52873
52870
  }
52874
52871
  let type;
@@ -52906,9 +52903,6 @@ function createTypeChecker(host) {
52906
52903
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
52907
52904
  return getTypeOfFuncClassEnumModule(symbol);
52908
52905
  }
52909
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
52910
- return type;
52911
- }
52912
52906
  return reportCircularityError(symbol);
52913
52907
  }
52914
52908
  return type;
@@ -53137,7 +53131,7 @@ function createTypeChecker(host) {
53137
53131
  }
53138
53132
  return getTypeOfSymbol(symbol);
53139
53133
  }
53140
- function getTypeOfSymbol(symbol, checkMode) {
53134
+ function getTypeOfSymbol(symbol) {
53141
53135
  const checkFlags = getCheckFlags(symbol);
53142
53136
  if (checkFlags & 65536 /* DeferredType */) {
53143
53137
  return getTypeOfSymbolWithDeferredType(symbol);
@@ -53152,7 +53146,7 @@ function createTypeChecker(host) {
53152
53146
  return getTypeOfReverseMappedSymbol(symbol);
53153
53147
  }
53154
53148
  if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
53155
- return getTypeOfVariableOrParameterOrProperty(symbol, checkMode);
53149
+ return getTypeOfVariableOrParameterOrProperty(symbol);
53156
53150
  }
53157
53151
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {
53158
53152
  return getTypeOfFuncClassEnumModule(symbol);
@@ -67515,9 +67509,9 @@ function createTypeChecker(host) {
67515
67509
  }
67516
67510
  }
67517
67511
  }
67518
- function getNarrowedTypeOfSymbol(symbol, location, checkMode) {
67512
+ function getNarrowedTypeOfSymbol(symbol, location) {
67519
67513
  var _a;
67520
- const type = getTypeOfSymbol(symbol, checkMode);
67514
+ const type = getTypeOfSymbol(symbol);
67521
67515
  const declaration = symbol.valueDeclaration;
67522
67516
  if (declaration) {
67523
67517
  if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
@@ -67644,7 +67638,7 @@ function createTypeChecker(host) {
67644
67638
  }
67645
67639
  }
67646
67640
  checkNestedBlockScopedBinding(node, symbol);
67647
- let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
67641
+ let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node);
67648
67642
  const assignmentKind = getAssignmentTargetKind(node);
67649
67643
  if (assignmentKind) {
67650
67644
  if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) {
@@ -68851,7 +68845,7 @@ function createTypeChecker(host) {
68851
68845
  function instantiateContextualType(contextualType, node, contextFlags) {
68852
68846
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
68853
68847
  const inferenceContext = getInferenceContext(node);
68854
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
68848
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
68855
68849
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
68856
68850
  }
68857
68851
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
package/lib/tsserver.js CHANGED
@@ -57421,7 +57421,7 @@ function createTypeChecker(host) {
57421
57421
  /*reportErrors*/
57422
57422
  false
57423
57423
  ) : unknownType;
57424
- return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, reportErrors2 ? 0 /* Normal */ : 1 /* Contextual */, contextualType)));
57424
+ return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
57425
57425
  }
57426
57426
  if (isBindingPattern(element.name)) {
57427
57427
  return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
@@ -57555,18 +57555,18 @@ function createTypeChecker(host) {
57555
57555
  }
57556
57556
  return false;
57557
57557
  }
57558
- function getTypeOfVariableOrParameterOrProperty(symbol, checkMode) {
57558
+ function getTypeOfVariableOrParameterOrProperty(symbol) {
57559
57559
  const links = getSymbolLinks(symbol);
57560
57560
  if (!links.type) {
57561
- const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode);
57562
- if (!links.type && !isParameterOfContextSensitiveSignature(symbol) && !checkMode) {
57561
+ const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
57562
+ if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
57563
57563
  links.type = type;
57564
57564
  }
57565
57565
  return type;
57566
57566
  }
57567
57567
  return links.type;
57568
57568
  }
57569
- function getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode) {
57569
+ function getTypeOfVariableOrParameterOrPropertyWorker(symbol) {
57570
57570
  if (symbol.flags & 4194304 /* Prototype */) {
57571
57571
  return getTypeOfPrototypeProperty(symbol);
57572
57572
  }
@@ -57604,9 +57604,6 @@ function createTypeChecker(host) {
57604
57604
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
57605
57605
  return getTypeOfFuncClassEnumModule(symbol);
57606
57606
  }
57607
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
57608
- return errorType;
57609
- }
57610
57607
  return reportCircularityError(symbol);
57611
57608
  }
57612
57609
  let type;
@@ -57644,9 +57641,6 @@ function createTypeChecker(host) {
57644
57641
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
57645
57642
  return getTypeOfFuncClassEnumModule(symbol);
57646
57643
  }
57647
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
57648
- return type;
57649
- }
57650
57644
  return reportCircularityError(symbol);
57651
57645
  }
57652
57646
  return type;
@@ -57875,7 +57869,7 @@ function createTypeChecker(host) {
57875
57869
  }
57876
57870
  return getTypeOfSymbol(symbol);
57877
57871
  }
57878
- function getTypeOfSymbol(symbol, checkMode) {
57872
+ function getTypeOfSymbol(symbol) {
57879
57873
  const checkFlags = getCheckFlags(symbol);
57880
57874
  if (checkFlags & 65536 /* DeferredType */) {
57881
57875
  return getTypeOfSymbolWithDeferredType(symbol);
@@ -57890,7 +57884,7 @@ function createTypeChecker(host) {
57890
57884
  return getTypeOfReverseMappedSymbol(symbol);
57891
57885
  }
57892
57886
  if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
57893
- return getTypeOfVariableOrParameterOrProperty(symbol, checkMode);
57887
+ return getTypeOfVariableOrParameterOrProperty(symbol);
57894
57888
  }
57895
57889
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {
57896
57890
  return getTypeOfFuncClassEnumModule(symbol);
@@ -72253,9 +72247,9 @@ function createTypeChecker(host) {
72253
72247
  }
72254
72248
  }
72255
72249
  }
72256
- function getNarrowedTypeOfSymbol(symbol, location, checkMode) {
72250
+ function getNarrowedTypeOfSymbol(symbol, location) {
72257
72251
  var _a;
72258
- const type = getTypeOfSymbol(symbol, checkMode);
72252
+ const type = getTypeOfSymbol(symbol);
72259
72253
  const declaration = symbol.valueDeclaration;
72260
72254
  if (declaration) {
72261
72255
  if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
@@ -72382,7 +72376,7 @@ function createTypeChecker(host) {
72382
72376
  }
72383
72377
  }
72384
72378
  checkNestedBlockScopedBinding(node, symbol);
72385
- let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
72379
+ let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node);
72386
72380
  const assignmentKind = getAssignmentTargetKind(node);
72387
72381
  if (assignmentKind) {
72388
72382
  if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) {
@@ -73589,7 +73583,7 @@ function createTypeChecker(host) {
73589
73583
  function instantiateContextualType(contextualType, node, contextFlags) {
73590
73584
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
73591
73585
  const inferenceContext = getInferenceContext(node);
73592
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
73586
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
73593
73587
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
73594
73588
  }
73595
73589
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
package/lib/typescript.js CHANGED
@@ -55176,7 +55176,7 @@ ${lanes.join("\n")}
55176
55176
  /*reportErrors*/
55177
55177
  false
55178
55178
  ) : unknownType;
55179
- return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, reportErrors2 ? 0 /* Normal */ : 1 /* Contextual */, contextualType)));
55179
+ return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType)));
55180
55180
  }
55181
55181
  if (isBindingPattern(element.name)) {
55182
55182
  return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2);
@@ -55310,18 +55310,18 @@ ${lanes.join("\n")}
55310
55310
  }
55311
55311
  return false;
55312
55312
  }
55313
- function getTypeOfVariableOrParameterOrProperty(symbol, checkMode) {
55313
+ function getTypeOfVariableOrParameterOrProperty(symbol) {
55314
55314
  const links = getSymbolLinks(symbol);
55315
55315
  if (!links.type) {
55316
- const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode);
55317
- if (!links.type && !isParameterOfContextSensitiveSignature(symbol) && !checkMode) {
55316
+ const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol);
55317
+ if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) {
55318
55318
  links.type = type;
55319
55319
  }
55320
55320
  return type;
55321
55321
  }
55322
55322
  return links.type;
55323
55323
  }
55324
- function getTypeOfVariableOrParameterOrPropertyWorker(symbol, checkMode) {
55324
+ function getTypeOfVariableOrParameterOrPropertyWorker(symbol) {
55325
55325
  if (symbol.flags & 4194304 /* Prototype */) {
55326
55326
  return getTypeOfPrototypeProperty(symbol);
55327
55327
  }
@@ -55359,9 +55359,6 @@ ${lanes.join("\n")}
55359
55359
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
55360
55360
  return getTypeOfFuncClassEnumModule(symbol);
55361
55361
  }
55362
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
55363
- return errorType;
55364
- }
55365
55362
  return reportCircularityError(symbol);
55366
55363
  }
55367
55364
  let type;
@@ -55399,9 +55396,6 @@ ${lanes.join("\n")}
55399
55396
  if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) {
55400
55397
  return getTypeOfFuncClassEnumModule(symbol);
55401
55398
  }
55402
- if (isBindingElement(declaration) && checkMode === 1 /* Contextual */) {
55403
- return type;
55404
- }
55405
55399
  return reportCircularityError(symbol);
55406
55400
  }
55407
55401
  return type;
@@ -55630,7 +55624,7 @@ ${lanes.join("\n")}
55630
55624
  }
55631
55625
  return getTypeOfSymbol(symbol);
55632
55626
  }
55633
- function getTypeOfSymbol(symbol, checkMode) {
55627
+ function getTypeOfSymbol(symbol) {
55634
55628
  const checkFlags = getCheckFlags(symbol);
55635
55629
  if (checkFlags & 65536 /* DeferredType */) {
55636
55630
  return getTypeOfSymbolWithDeferredType(symbol);
@@ -55645,7 +55639,7 @@ ${lanes.join("\n")}
55645
55639
  return getTypeOfReverseMappedSymbol(symbol);
55646
55640
  }
55647
55641
  if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) {
55648
- return getTypeOfVariableOrParameterOrProperty(symbol, checkMode);
55642
+ return getTypeOfVariableOrParameterOrProperty(symbol);
55649
55643
  }
55650
55644
  if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) {
55651
55645
  return getTypeOfFuncClassEnumModule(symbol);
@@ -70008,9 +70002,9 @@ ${lanes.join("\n")}
70008
70002
  }
70009
70003
  }
70010
70004
  }
70011
- function getNarrowedTypeOfSymbol(symbol, location, checkMode) {
70005
+ function getNarrowedTypeOfSymbol(symbol, location) {
70012
70006
  var _a;
70013
- const type = getTypeOfSymbol(symbol, checkMode);
70007
+ const type = getTypeOfSymbol(symbol);
70014
70008
  const declaration = symbol.valueDeclaration;
70015
70009
  if (declaration) {
70016
70010
  if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
@@ -70137,7 +70131,7 @@ ${lanes.join("\n")}
70137
70131
  }
70138
70132
  }
70139
70133
  checkNestedBlockScopedBinding(node, symbol);
70140
- let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node, checkMode);
70134
+ let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node);
70141
70135
  const assignmentKind = getAssignmentTargetKind(node);
70142
70136
  if (assignmentKind) {
70143
70137
  if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) {
@@ -71344,7 +71338,7 @@ ${lanes.join("\n")}
71344
71338
  function instantiateContextualType(contextualType, node, contextFlags) {
71345
71339
  if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) {
71346
71340
  const inferenceContext = getInferenceContext(node);
71347
- if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
71341
+ if (inferenceContext && (contextFlags & 1 /* Signature */ || maybeTypeOfKind(contextualType, 25165824 /* Simplifiable */)) && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) {
71348
71342
  return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper);
71349
71343
  }
71350
71344
  if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) {
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-56753-16",
5
+ "version": "5.4.0-pr-48838-21",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "c4cd94a606f3058158051f20dc3ba16d247d9fa1"
117
+ "gitHead": "582dd51fd6231fdee0cbd5e79ff9bc052f88b16d"
118
118
  }