typescript 4.8.0-dev.20220621 → 4.8.0-dev.20220624

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.
@@ -19,7 +19,22 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  declare namespace Intl {
22
- type DateTimeFormatPartTypes = "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year";
22
+
23
+ interface DateTimeFormatPartTypesRegistry {
24
+ day: any
25
+ dayPeriod: any
26
+ era: any
27
+ hour: any
28
+ literal: any
29
+ minute: any
30
+ month: any
31
+ second: any
32
+ timeZoneName: any
33
+ weekday: any
34
+ year: any
35
+ }
36
+
37
+ type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry;
23
38
 
24
39
  interface DateTimeFormatPart {
25
40
  type: DateTimeFormatPartTypes;
@@ -20,6 +20,10 @@ and limitations under the License.
20
20
 
21
21
  declare namespace Intl {
22
22
 
23
+ interface DateTimeFormatPartTypesRegistry {
24
+ fractionalSecond: any
25
+ }
26
+
23
27
  interface DateTimeFormatOptions {
24
28
  formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
25
29
  dateStyle?: "full" | "long" | "medium" | "short" | undefined;
package/lib/lib.es5.d.ts CHANGED
@@ -933,12 +933,24 @@ interface DateConstructor {
933
933
  declare var Date: DateConstructor;
934
934
 
935
935
  interface RegExpMatchArray extends Array<string> {
936
+ /**
937
+ * The index of the search at which the result was found.
938
+ */
936
939
  index?: number;
940
+ /**
941
+ * A copy of the search string.
942
+ */
937
943
  input?: string;
938
944
  }
939
945
 
940
946
  interface RegExpExecArray extends Array<string> {
947
+ /**
948
+ * The index of the search at which the result was found.
949
+ */
941
950
  index: number;
951
+ /**
952
+ * A copy of the search string.
953
+ */
942
954
  input: string;
943
955
  }
944
956
 
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.8";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -40238,6 +40238,9 @@ var ts;
40238
40238
  var markerSubType = createTypeParameter();
40239
40239
  markerSubType.constraint = markerSuperType;
40240
40240
  var markerOtherType = createTypeParameter();
40241
+ var markerSuperTypeForCheck = createTypeParameter();
40242
+ var markerSubTypeForCheck = createTypeParameter();
40243
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
40241
40244
  var noTypePredicate = createTypePredicate(1, "<<unresolved>>", 0, anyType);
40242
40245
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, 0);
40243
40246
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, undefined, 0, 0);
@@ -43595,8 +43598,8 @@ var ts;
43595
43598
  if (type.symbol) {
43596
43599
  return symbolToTypeNode(type.symbol, context, 788968);
43597
43600
  }
43598
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
43599
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
43601
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
43602
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
43600
43603
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), undefined);
43601
43604
  }
43602
43605
  if (type.flags & 1048576 && type.origin) {
@@ -53828,7 +53831,7 @@ var ts;
53828
53831
  });
53829
53832
  }
53830
53833
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
53831
- if (target.flags & 131068)
53834
+ if (target.flags & (131068 | 131072))
53832
53835
  return false;
53833
53836
  if (isTupleLikeType(source)) {
53834
53837
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -53893,7 +53896,7 @@ var ts;
53893
53896
  });
53894
53897
  }
53895
53898
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
53896
- if (target.flags & 131068)
53899
+ if (target.flags & (131068 | 131072))
53897
53900
  return false;
53898
53901
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
53899
53902
  }
@@ -54431,7 +54434,7 @@ var ts;
54431
54434
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
54432
54435
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
54433
54436
  }
54434
- if (target.flags & 262144 && target !== markerSuperType && target !== markerSubType) {
54437
+ if (target.flags & 262144 && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
54435
54438
  var constraint = getBaseConstraintOfType(target);
54436
54439
  var needsOriginalSource = void 0;
54437
54440
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -64069,6 +64072,8 @@ var ts;
64069
64072
  if (result) {
64070
64073
  return result;
64071
64074
  }
64075
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
64076
+ getNodeLinks(node).resolvedSignature = result;
64072
64077
  if (reportErrors) {
64073
64078
  if (candidatesForArgumentError) {
64074
64079
  if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) {
@@ -64154,7 +64159,7 @@ var ts;
64154
64159
  }
64155
64160
  }
64156
64161
  }
64157
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
64162
+ return result;
64158
64163
  function addImplementationSuccessElaboration(failed, diagnostic) {
64159
64164
  var _a, _b;
64160
64165
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -67539,8 +67544,8 @@ var ts;
67539
67544
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
67540
67545
  }
67541
67546
  else if (modifiers === 32768 || modifiers === 65536) {
67542
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSubType : markerSuperType);
67543
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSuperType : markerSubType);
67547
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSubTypeForCheck : markerSuperTypeForCheck);
67548
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSuperTypeForCheck : markerSubTypeForCheck);
67544
67549
  var saveVarianceTypeParameter = typeParameter;
67545
67550
  varianceTypeParameter = typeParameter;
67546
67551
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -49109,6 +49109,9 @@ var ts;
49109
49109
  var markerSubType = createTypeParameter();
49110
49110
  markerSubType.constraint = markerSuperType;
49111
49111
  var markerOtherType = createTypeParameter();
49112
+ var markerSuperTypeForCheck = createTypeParameter();
49113
+ var markerSubTypeForCheck = createTypeParameter();
49114
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
49112
49115
  var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
49113
49116
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
49114
49117
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
@@ -52945,8 +52948,8 @@ var ts;
52945
52948
  if (type.symbol) {
52946
52949
  return symbolToTypeNode(type.symbol, context, 788968 /* Type */);
52947
52950
  }
52948
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
52949
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
52951
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
52952
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
52950
52953
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), /*typeArguments*/ undefined);
52951
52954
  }
52952
52955
  if (type.flags & 1048576 /* Union */ && type.origin) {
@@ -64627,7 +64630,7 @@ var ts;
64627
64630
  });
64628
64631
  }
64629
64632
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64630
- if (target.flags & 131068 /* Primitive */)
64633
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64631
64634
  return false;
64632
64635
  if (isTupleLikeType(source)) {
64633
64636
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -64694,7 +64697,7 @@ var ts;
64694
64697
  });
64695
64698
  }
64696
64699
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64697
- if (target.flags & 131068 /* Primitive */)
64700
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64698
64701
  return false;
64699
64702
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
64700
64703
  }
@@ -65293,7 +65296,7 @@ var ts;
65293
65296
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
65294
65297
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
65295
65298
  }
65296
- if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperType && target !== markerSubType) {
65299
+ if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
65297
65300
  var constraint = getBaseConstraintOfType(target);
65298
65301
  var needsOriginalSource = void 0;
65299
65302
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -76640,6 +76643,15 @@ var ts;
76640
76643
  if (result) {
76641
76644
  return result;
76642
76645
  }
76646
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76647
+ // Preemptively cache the result; getResolvedSignature will do this after we return, but
76648
+ // we need to ensure that the result is present for the error checks below so that if
76649
+ // this signature is encountered again, we handle the circularity (rather than producing a
76650
+ // different result which may produce no errors and assert). Callers of getResolvedSignature
76651
+ // don't hit this issue because they only observe this result after it's had a chance to
76652
+ // be cached, but the error reporting code below executes before getResolvedSignature sets
76653
+ // resolvedSignature.
76654
+ getNodeLinks(node).resolvedSignature = result;
76643
76655
  // No signatures were applicable. Now report errors based on the last applicable signature with
76644
76656
  // no arguments excluded from assignability checks.
76645
76657
  // If candidate is undefined, it means that no candidates had a suitable arity. In that case,
@@ -76731,7 +76743,7 @@ var ts;
76731
76743
  }
76732
76744
  }
76733
76745
  }
76734
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76746
+ return result;
76735
76747
  function addImplementationSuccessElaboration(failed, diagnostic) {
76736
76748
  var _a, _b;
76737
76749
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -80534,8 +80546,8 @@ var ts;
80534
80546
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
80535
80547
  }
80536
80548
  else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
80537
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubType : markerSuperType);
80538
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperType : markerSubType);
80549
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
80550
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
80539
80551
  var saveVarianceTypeParameter = typeParameter;
80540
80552
  varianceTypeParameter = typeParameter;
80541
80553
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
@@ -129769,7 +129781,7 @@ var ts;
129769
129781
  for (var _b = 0, textChanges_1 = textChanges_2; _b < textChanges_1.length; _b++) {
129770
129782
  var change = textChanges_1[_b];
129771
129783
  var span = change.span, newText = change.newText;
129772
- var index = indexInTextChange(newText, name);
129784
+ var index = indexInTextChange(newText, ts.escapeString(name));
129773
129785
  if (index !== -1) {
129774
129786
  lastPos = span.start + delta + index;
129775
129787
  // If the reference comes first, return immediately.
@@ -303,7 +303,7 @@ var ts;
303
303
  // The following is baselined as a literal template type without intervention
304
304
  /** The version of the TypeScript compiler release */
305
305
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
306
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
306
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
307
307
  /* @internal */
308
308
  var Comparison;
309
309
  (function (Comparison) {
@@ -49303,6 +49303,9 @@ var ts;
49303
49303
  var markerSubType = createTypeParameter();
49304
49304
  markerSubType.constraint = markerSuperType;
49305
49305
  var markerOtherType = createTypeParameter();
49306
+ var markerSuperTypeForCheck = createTypeParameter();
49307
+ var markerSubTypeForCheck = createTypeParameter();
49308
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
49306
49309
  var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
49307
49310
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
49308
49311
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
@@ -53139,8 +53142,8 @@ var ts;
53139
53142
  if (type.symbol) {
53140
53143
  return symbolToTypeNode(type.symbol, context, 788968 /* Type */);
53141
53144
  }
53142
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
53143
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53145
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
53146
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53144
53147
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), /*typeArguments*/ undefined);
53145
53148
  }
53146
53149
  if (type.flags & 1048576 /* Union */ && type.origin) {
@@ -64821,7 +64824,7 @@ var ts;
64821
64824
  });
64822
64825
  }
64823
64826
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64824
- if (target.flags & 131068 /* Primitive */)
64827
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64825
64828
  return false;
64826
64829
  if (isTupleLikeType(source)) {
64827
64830
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -64888,7 +64891,7 @@ var ts;
64888
64891
  });
64889
64892
  }
64890
64893
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64891
- if (target.flags & 131068 /* Primitive */)
64894
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64892
64895
  return false;
64893
64896
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
64894
64897
  }
@@ -65487,7 +65490,7 @@ var ts;
65487
65490
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
65488
65491
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
65489
65492
  }
65490
- if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperType && target !== markerSubType) {
65493
+ if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
65491
65494
  var constraint = getBaseConstraintOfType(target);
65492
65495
  var needsOriginalSource = void 0;
65493
65496
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -76834,6 +76837,15 @@ var ts;
76834
76837
  if (result) {
76835
76838
  return result;
76836
76839
  }
76840
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76841
+ // Preemptively cache the result; getResolvedSignature will do this after we return, but
76842
+ // we need to ensure that the result is present for the error checks below so that if
76843
+ // this signature is encountered again, we handle the circularity (rather than producing a
76844
+ // different result which may produce no errors and assert). Callers of getResolvedSignature
76845
+ // don't hit this issue because they only observe this result after it's had a chance to
76846
+ // be cached, but the error reporting code below executes before getResolvedSignature sets
76847
+ // resolvedSignature.
76848
+ getNodeLinks(node).resolvedSignature = result;
76837
76849
  // No signatures were applicable. Now report errors based on the last applicable signature with
76838
76850
  // no arguments excluded from assignability checks.
76839
76851
  // If candidate is undefined, it means that no candidates had a suitable arity. In that case,
@@ -76925,7 +76937,7 @@ var ts;
76925
76937
  }
76926
76938
  }
76927
76939
  }
76928
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76940
+ return result;
76929
76941
  function addImplementationSuccessElaboration(failed, diagnostic) {
76930
76942
  var _a, _b;
76931
76943
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -80728,8 +80740,8 @@ var ts;
80728
80740
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
80729
80741
  }
80730
80742
  else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
80731
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubType : markerSuperType);
80732
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperType : markerSubType);
80743
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
80744
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
80733
80745
  var saveVarianceTypeParameter = typeParameter;
80734
80746
  varianceTypeParameter = typeParameter;
80735
80747
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
@@ -130382,7 +130394,7 @@ var ts;
130382
130394
  for (var _b = 0, textChanges_1 = textChanges_2; _b < textChanges_1.length; _b++) {
130383
130395
  var change = textChanges_1[_b];
130384
130396
  var span = change.span, newText = change.newText;
130385
- var index = indexInTextChange(newText, name);
130397
+ var index = indexInTextChange(newText, ts.escapeString(name));
130386
130398
  if (index !== -1) {
130387
130399
  lastPos = span.start + delta + index;
130388
130400
  // If the reference comes first, return immediately.
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -49294,6 +49294,9 @@ var ts;
49294
49294
  var markerSubType = createTypeParameter();
49295
49295
  markerSubType.constraint = markerSuperType;
49296
49296
  var markerOtherType = createTypeParameter();
49297
+ var markerSuperTypeForCheck = createTypeParameter();
49298
+ var markerSubTypeForCheck = createTypeParameter();
49299
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
49297
49300
  var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
49298
49301
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
49299
49302
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
@@ -53130,8 +53133,8 @@ var ts;
53130
53133
  if (type.symbol) {
53131
53134
  return symbolToTypeNode(type.symbol, context, 788968 /* Type */);
53132
53135
  }
53133
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
53134
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53136
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
53137
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53135
53138
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), /*typeArguments*/ undefined);
53136
53139
  }
53137
53140
  if (type.flags & 1048576 /* Union */ && type.origin) {
@@ -64812,7 +64815,7 @@ var ts;
64812
64815
  });
64813
64816
  }
64814
64817
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64815
- if (target.flags & 131068 /* Primitive */)
64818
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64816
64819
  return false;
64817
64820
  if (isTupleLikeType(source)) {
64818
64821
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -64879,7 +64882,7 @@ var ts;
64879
64882
  });
64880
64883
  }
64881
64884
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64882
- if (target.flags & 131068 /* Primitive */)
64885
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64883
64886
  return false;
64884
64887
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
64885
64888
  }
@@ -65478,7 +65481,7 @@ var ts;
65478
65481
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
65479
65482
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
65480
65483
  }
65481
- if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperType && target !== markerSubType) {
65484
+ if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
65482
65485
  var constraint = getBaseConstraintOfType(target);
65483
65486
  var needsOriginalSource = void 0;
65484
65487
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -76825,6 +76828,15 @@ var ts;
76825
76828
  if (result) {
76826
76829
  return result;
76827
76830
  }
76831
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76832
+ // Preemptively cache the result; getResolvedSignature will do this after we return, but
76833
+ // we need to ensure that the result is present for the error checks below so that if
76834
+ // this signature is encountered again, we handle the circularity (rather than producing a
76835
+ // different result which may produce no errors and assert). Callers of getResolvedSignature
76836
+ // don't hit this issue because they only observe this result after it's had a chance to
76837
+ // be cached, but the error reporting code below executes before getResolvedSignature sets
76838
+ // resolvedSignature.
76839
+ getNodeLinks(node).resolvedSignature = result;
76828
76840
  // No signatures were applicable. Now report errors based on the last applicable signature with
76829
76841
  // no arguments excluded from assignability checks.
76830
76842
  // If candidate is undefined, it means that no candidates had a suitable arity. In that case,
@@ -76916,7 +76928,7 @@ var ts;
76916
76928
  }
76917
76929
  }
76918
76930
  }
76919
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76931
+ return result;
76920
76932
  function addImplementationSuccessElaboration(failed, diagnostic) {
76921
76933
  var _a, _b;
76922
76934
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -80719,8 +80731,8 @@ var ts;
80719
80731
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
80720
80732
  }
80721
80733
  else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
80722
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubType : markerSuperType);
80723
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperType : markerSubType);
80734
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
80735
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
80724
80736
  var saveVarianceTypeParameter = typeParameter;
80725
80737
  varianceTypeParameter = typeParameter;
80726
80738
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
@@ -130373,7 +130385,7 @@ var ts;
130373
130385
  for (var _b = 0, textChanges_1 = textChanges_2; _b < textChanges_1.length; _b++) {
130374
130386
  var change = textChanges_1[_b];
130375
130387
  var span = change.span, newText = change.newText;
130376
- var index = indexInTextChange(newText, name);
130388
+ var index = indexInTextChange(newText, ts.escapeString(name));
130377
130389
  if (index !== -1) {
130378
130390
  lastPos = span.start + delta + index;
130379
130391
  // If the reference comes first, return immediately.
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -49294,6 +49294,9 @@ var ts;
49294
49294
  var markerSubType = createTypeParameter();
49295
49295
  markerSubType.constraint = markerSuperType;
49296
49296
  var markerOtherType = createTypeParameter();
49297
+ var markerSuperTypeForCheck = createTypeParameter();
49298
+ var markerSubTypeForCheck = createTypeParameter();
49299
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
49297
49300
  var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
49298
49301
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
49299
49302
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
@@ -53130,8 +53133,8 @@ var ts;
53130
53133
  if (type.symbol) {
53131
53134
  return symbolToTypeNode(type.symbol, context, 788968 /* Type */);
53132
53135
  }
53133
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
53134
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53136
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
53137
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
53135
53138
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), /*typeArguments*/ undefined);
53136
53139
  }
53137
53140
  if (type.flags & 1048576 /* Union */ && type.origin) {
@@ -64812,7 +64815,7 @@ var ts;
64812
64815
  });
64813
64816
  }
64814
64817
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64815
- if (target.flags & 131068 /* Primitive */)
64818
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64816
64819
  return false;
64817
64820
  if (isTupleLikeType(source)) {
64818
64821
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -64879,7 +64882,7 @@ var ts;
64879
64882
  });
64880
64883
  }
64881
64884
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64882
- if (target.flags & 131068 /* Primitive */)
64885
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64883
64886
  return false;
64884
64887
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
64885
64888
  }
@@ -65478,7 +65481,7 @@ var ts;
65478
65481
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
65479
65482
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
65480
65483
  }
65481
- if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperType && target !== markerSubType) {
65484
+ if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
65482
65485
  var constraint = getBaseConstraintOfType(target);
65483
65486
  var needsOriginalSource = void 0;
65484
65487
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -76825,6 +76828,15 @@ var ts;
76825
76828
  if (result) {
76826
76829
  return result;
76827
76830
  }
76831
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76832
+ // Preemptively cache the result; getResolvedSignature will do this after we return, but
76833
+ // we need to ensure that the result is present for the error checks below so that if
76834
+ // this signature is encountered again, we handle the circularity (rather than producing a
76835
+ // different result which may produce no errors and assert). Callers of getResolvedSignature
76836
+ // don't hit this issue because they only observe this result after it's had a chance to
76837
+ // be cached, but the error reporting code below executes before getResolvedSignature sets
76838
+ // resolvedSignature.
76839
+ getNodeLinks(node).resolvedSignature = result;
76828
76840
  // No signatures were applicable. Now report errors based on the last applicable signature with
76829
76841
  // no arguments excluded from assignability checks.
76830
76842
  // If candidate is undefined, it means that no candidates had a suitable arity. In that case,
@@ -76916,7 +76928,7 @@ var ts;
76916
76928
  }
76917
76929
  }
76918
76930
  }
76919
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76931
+ return result;
76920
76932
  function addImplementationSuccessElaboration(failed, diagnostic) {
76921
76933
  var _a, _b;
76922
76934
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -80719,8 +80731,8 @@ var ts;
80719
80731
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
80720
80732
  }
80721
80733
  else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
80722
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubType : markerSuperType);
80723
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperType : markerSubType);
80734
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
80735
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
80724
80736
  var saveVarianceTypeParameter = typeParameter;
80725
80737
  varianceTypeParameter = typeParameter;
80726
80738
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
@@ -130373,7 +130385,7 @@ var ts;
130373
130385
  for (var _b = 0, textChanges_1 = textChanges_2; _b < textChanges_1.length; _b++) {
130374
130386
  var change = textChanges_1[_b];
130375
130387
  var span = change.span, newText = change.newText;
130376
- var index = indexInTextChange(newText, name);
130388
+ var index = indexInTextChange(newText, ts.escapeString(name));
130377
130389
  if (index !== -1) {
130378
130390
  lastPos = span.start + delta + index;
130379
130391
  // If the reference comes first, return immediately.
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220621";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220624";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -49089,6 +49089,9 @@ var ts;
49089
49089
  var markerSubType = createTypeParameter();
49090
49090
  markerSubType.constraint = markerSuperType;
49091
49091
  var markerOtherType = createTypeParameter();
49092
+ var markerSuperTypeForCheck = createTypeParameter();
49093
+ var markerSubTypeForCheck = createTypeParameter();
49094
+ markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
49092
49095
  var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
49093
49096
  var anySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
49094
49097
  var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, /*resolvedTypePredicate*/ undefined, 0, 0 /* None */);
@@ -52925,8 +52928,8 @@ var ts;
52925
52928
  if (type.symbol) {
52926
52929
  return symbolToTypeNode(type.symbol, context, 788968 /* Type */);
52927
52930
  }
52928
- var name = (type === markerSuperType || type === markerSubType) && varianceTypeParameter && varianceTypeParameter.symbol ?
52929
- (type === markerSubType ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
52931
+ var name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ?
52932
+ (type === markerSubTypeForCheck ? "sub-" : "super-") + ts.symbolName(varianceTypeParameter.symbol) : "?";
52930
52933
  return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(name), /*typeArguments*/ undefined);
52931
52934
  }
52932
52935
  if (type.flags & 1048576 /* Union */ && type.origin) {
@@ -64607,7 +64610,7 @@ var ts;
64607
64610
  });
64608
64611
  }
64609
64612
  function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64610
- if (target.flags & 131068 /* Primitive */)
64613
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64611
64614
  return false;
64612
64615
  if (isTupleLikeType(source)) {
64613
64616
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
@@ -64674,7 +64677,7 @@ var ts;
64674
64677
  });
64675
64678
  }
64676
64679
  function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) {
64677
- if (target.flags & 131068 /* Primitive */)
64680
+ if (target.flags & (131068 /* Primitive */ | 131072 /* Never */))
64678
64681
  return false;
64679
64682
  return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer);
64680
64683
  }
@@ -65273,7 +65276,7 @@ var ts;
65273
65276
  ts.Debug.assert(!isTypeAssignableTo(generalizedSource, target), "generalized source shouldn't be assignable");
65274
65277
  generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource);
65275
65278
  }
65276
- if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperType && target !== markerSubType) {
65279
+ if (target.flags & 262144 /* TypeParameter */ && target !== markerSuperTypeForCheck && target !== markerSubTypeForCheck) {
65277
65280
  var constraint = getBaseConstraintOfType(target);
65278
65281
  var needsOriginalSource = void 0;
65279
65282
  if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source, constraint)))) {
@@ -76620,6 +76623,15 @@ var ts;
76620
76623
  if (result) {
76621
76624
  return result;
76622
76625
  }
76626
+ result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76627
+ // Preemptively cache the result; getResolvedSignature will do this after we return, but
76628
+ // we need to ensure that the result is present for the error checks below so that if
76629
+ // this signature is encountered again, we handle the circularity (rather than producing a
76630
+ // different result which may produce no errors and assert). Callers of getResolvedSignature
76631
+ // don't hit this issue because they only observe this result after it's had a chance to
76632
+ // be cached, but the error reporting code below executes before getResolvedSignature sets
76633
+ // resolvedSignature.
76634
+ getNodeLinks(node).resolvedSignature = result;
76623
76635
  // No signatures were applicable. Now report errors based on the last applicable signature with
76624
76636
  // no arguments excluded from assignability checks.
76625
76637
  // If candidate is undefined, it means that no candidates had a suitable arity. In that case,
@@ -76711,7 +76723,7 @@ var ts;
76711
76723
  }
76712
76724
  }
76713
76725
  }
76714
- return getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode);
76726
+ return result;
76715
76727
  function addImplementationSuccessElaboration(failed, diagnostic) {
76716
76728
  var _a, _b;
76717
76729
  var oldCandidatesForArgumentError = candidatesForArgumentError;
@@ -80514,8 +80526,8 @@ var ts;
80514
80526
  error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
80515
80527
  }
80516
80528
  else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) {
80517
- var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubType : markerSuperType);
80518
- var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperType : markerSubType);
80529
+ var source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck);
80530
+ var target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck);
80519
80531
  var saveVarianceTypeParameter = typeParameter;
80520
80532
  varianceTypeParameter = typeParameter;
80521
80533
  checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.8.0-dev.20220621",
5
+ "version": "4.8.0-dev.20220624",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [