@typescript-deploys/pr-build 4.8.0-pr-49863-9 → 4.8.0-pr-49884-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/lib.dom.d.ts CHANGED
@@ -13848,11 +13848,11 @@ declare var SubmitEvent: {
13848
13848
  * Available only in secure contexts.
13849
13849
  */
13850
13850
  interface SubtleCrypto {
13851
- decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
13851
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
13852
13852
  deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
13853
13853
  deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
13854
13854
  digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
13855
- encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
13855
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
13856
13856
  exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
13857
13857
  exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
13858
13858
  generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
@@ -19,18 +19,38 @@ and limitations under the License.
19
19
 
20
20
 
21
21
  interface Map<K, V> {
22
+
22
23
  clear(): void;
24
+ /**
25
+ * @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
26
+ */
23
27
  delete(key: K): boolean;
28
+ /**
29
+ * Executes a provided function once per each key/value pair in the Map, in insertion order.
30
+ */
24
31
  forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
32
+ /**
33
+ * Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
34
+ * @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
35
+ */
25
36
  get(key: K): V | undefined;
37
+ /**
38
+ * @returns boolean indicating whether an element with the specified key exists or not.
39
+ */
26
40
  has(key: K): boolean;
41
+ /**
42
+ * Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
43
+ */
27
44
  set(key: K, value: V): this;
45
+ /**
46
+ * @returns the number of elements in the Map.
47
+ */
28
48
  readonly size: number;
29
49
  }
30
50
 
31
51
  interface MapConstructor {
32
52
  new(): Map<any, any>;
33
- new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
53
+ new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
34
54
  readonly prototype: Map<any, any>;
35
55
  }
36
56
  declare var Map: MapConstructor;
@@ -43,9 +63,23 @@ interface ReadonlyMap<K, V> {
43
63
  }
44
64
 
45
65
  interface WeakMap<K extends object, V> {
66
+ /**
67
+ * Removes the specified element from the WeakMap.
68
+ * @returns true if the element was successfully removed, or false if it was not present.
69
+ */
46
70
  delete(key: K): boolean;
71
+ /**
72
+ * @returns a specified element.
73
+ */
47
74
  get(key: K): V | undefined;
75
+ /**
76
+ * @returns a boolean indicating whether an element with the specified key exists or not.
77
+ */
48
78
  has(key: K): boolean;
79
+ /**
80
+ * Adds a new element with a specified key and value.
81
+ * @param key Must be an object.
82
+ */
49
83
  set(key: K, value: V): this;
50
84
  }
51
85
 
@@ -56,11 +90,28 @@ interface WeakMapConstructor {
56
90
  declare var WeakMap: WeakMapConstructor;
57
91
 
58
92
  interface Set<T> {
93
+ /**
94
+ * Appends a new element with a specified value to the end of the Set.
95
+ */
59
96
  add(value: T): this;
97
+
60
98
  clear(): void;
99
+ /**
100
+ * Removes a specified value from the Set.
101
+ * @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
102
+ */
61
103
  delete(value: T): boolean;
104
+ /**
105
+ * Executes a provided function once per each value in the Set object, in insertion order.
106
+ */
62
107
  forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
108
+ /**
109
+ * @returns a boolean indicating whether an element with the specified value exists in the Set or not.
110
+ */
63
111
  has(value: T): boolean;
112
+ /**
113
+ * @returns the number of (unique) elements in Set.
114
+ */
64
115
  readonly size: number;
65
116
  }
66
117
 
@@ -77,8 +128,18 @@ interface ReadonlySet<T> {
77
128
  }
78
129
 
79
130
  interface WeakSet<T extends object> {
131
+ /**
132
+ * Appends a new object to the end of the WeakSet.
133
+ */
80
134
  add(value: T): this;
135
+ /**
136
+ * Removes the specified element from the WeakSet.
137
+ * @returns Returns true if the element existed and has been removed, or false if the element does not exist.
138
+ */
81
139
  delete(value: T): boolean;
140
+ /**
141
+ * @returns a boolean indicating whether an object exists in the WeakSet or not.
142
+ */
82
143
  has(value: T): boolean;
83
144
  }
84
145
 
@@ -3008,11 +3008,11 @@ declare var StorageManager: {
3008
3008
  * Available only in secure contexts.
3009
3009
  */
3010
3010
  interface SubtleCrypto {
3011
- decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
3011
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3012
3012
  deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
3013
3013
  deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3014
3014
  digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
3015
- encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
3015
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3016
3016
  exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
3017
3017
  exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
3018
3018
  generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
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-insiders.20220711";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220720";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -6809,7 +6809,6 @@ var ts;
6809
6809
  Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, ts.DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
6810
6810
  Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
6811
6811
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, ts.DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
6812
- Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any: diag(6804, ts.DiagnosticCategory.Message, "Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any_6804", "Default type arguments to parameter constraint or 'unknown' instead of 'any'."),
6813
6812
  one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
6814
6813
  one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
6815
6814
  type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
@@ -28487,6 +28486,9 @@ var ts;
28487
28486
  var typeArguments = tryParse(parseTypeArgumentsInExpression);
28488
28487
  if (typeArguments !== undefined) {
28489
28488
  parseErrorAt(startPos, getNodePos(), ts.Diagnostics.super_may_not_use_type_arguments);
28489
+ if (!isTemplateStartOfTaggedTemplate()) {
28490
+ expression = factory.createExpressionWithTypeArguments(expression, typeArguments);
28491
+ }
28490
28492
  }
28491
28493
  }
28492
28494
  if (token() === 20 || token() === 24 || token() === 22) {
@@ -32593,16 +32595,6 @@ var ts;
32593
32595
  description: ts.Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
32594
32596
  defaultValueDescription: false,
32595
32597
  },
32596
- {
32597
- name: "inferInstanceTypeArgumentsAsConstraint",
32598
- type: "boolean",
32599
- affectsSemanticDiagnostics: true,
32600
- affectsMultiFileEmitBuildInfo: true,
32601
- strictFlag: true,
32602
- category: ts.Diagnostics.Type_Checking,
32603
- description: ts.Diagnostics.Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any,
32604
- defaultValueDescription: false,
32605
- },
32606
32598
  {
32607
32599
  name: "alwaysStrict",
32608
32600
  type: "boolean",
@@ -38468,24 +38460,6 @@ var ts;
38468
38460
  typeLiteralSymbol.members.set(symbol.escapedName, symbol);
38469
38461
  }
38470
38462
  function bindObjectLiteralExpression(node) {
38471
- if (inStrictMode && !ts.isAssignmentTarget(node)) {
38472
- var seen = new ts.Map();
38473
- for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
38474
- var prop = _a[_i];
38475
- if (prop.kind === 298 || prop.name.kind !== 79) {
38476
- continue;
38477
- }
38478
- var identifier = prop.name;
38479
- var currentKind = prop.kind === 296 || prop.kind === 297 || prop.kind === 169
38480
- ? 1
38481
- : 2;
38482
- var existingKind = seen.get(identifier.escapedText);
38483
- if (!existingKind) {
38484
- seen.set(identifier.escapedText, currentKind);
38485
- continue;
38486
- }
38487
- }
38488
- }
38489
38463
  return bindAnonymousDeclaration(node, 4096, "__object");
38490
38464
  }
38491
38465
  function bindJsxAttributes(node) {
@@ -39908,7 +39882,6 @@ var ts;
39908
39882
  var noImplicitAny = ts.getStrictOptionValue(compilerOptions, "noImplicitAny");
39909
39883
  var noImplicitThis = ts.getStrictOptionValue(compilerOptions, "noImplicitThis");
39910
39884
  var useUnknownInCatchVariables = ts.getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
39911
- var inferInstanceTypeArgumentsAsConstraint = ts.getStrictOptionValue(compilerOptions, "inferInstanceTypeArgumentsAsConstraint");
39912
39885
  var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
39913
39886
  var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192;
39914
39887
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
@@ -40290,11 +40263,10 @@ var ts;
40290
40263
  var unresolvedSymbols = new ts.Map();
40291
40264
  var errorTypes = new ts.Map();
40292
40265
  var anyType = createIntrinsicType(1, "any");
40293
- var autoType = createIntrinsicType(1, "any");
40266
+ var autoType = createIntrinsicType(1, "any", 262144);
40294
40267
  var wildcardType = createIntrinsicType(1, "any");
40295
40268
  var errorType = createIntrinsicType(1, "error");
40296
40269
  var unresolvedType = createIntrinsicType(1, "unresolved");
40297
- var nonInferrableAnyType = createIntrinsicType(1, "any", 65536);
40298
40270
  var intrinsicMarkerType = createIntrinsicType(1, "intrinsic");
40299
40271
  var unknownType = createIntrinsicType(2, "unknown");
40300
40272
  var nonNullUnknownType = createIntrinsicType(2, "unknown");
@@ -40323,8 +40295,7 @@ var ts;
40323
40295
  var esSymbolType = createIntrinsicType(4096, "symbol");
40324
40296
  var voidType = createIntrinsicType(16384, "void");
40325
40297
  var neverType = createIntrinsicType(131072, "never");
40326
- var silentNeverType = createIntrinsicType(131072, "never");
40327
- var nonInferrableType = createIntrinsicType(131072, "never", 262144);
40298
+ var silentNeverType = createIntrinsicType(131072, "never", 262144);
40328
40299
  var implicitNeverType = createIntrinsicType(131072, "never");
40329
40300
  var unreachableNeverType = createIntrinsicType(131072, "never");
40330
40301
  var nonPrimitiveType = createIntrinsicType(67108864, "object");
@@ -41414,7 +41385,7 @@ var ts;
41414
41385
  }
41415
41386
  }
41416
41387
  function checkAndReportErrorForInvalidInitializer() {
41417
- if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 && useDefineForClassFields)) {
41388
+ if (propertyWithInvalidInitializer && !(useDefineForClassFields && ts.getEmitScriptTarget(compilerOptions) >= 9)) {
41418
41389
  error(errorLocation, errorLocation && propertyWithInvalidInitializer.type && ts.textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos)
41419
41390
  ? ts.Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor
41420
41391
  : ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyWithInvalidInitializer.name), diagnosticName(nameArg));
@@ -46426,19 +46397,9 @@ var ts;
46426
46397
  }
46427
46398
  }).parent;
46428
46399
  }
46429
- function getInstanceTypeOfClassSymbol(classSymbol) {
46430
- var classType = getDeclaredTypeOfSymbol(classSymbol);
46431
- if (!classType.typeParameters) {
46432
- return classType;
46433
- }
46434
- var typeArguments = ts.map(classType.typeParameters, function (typeParameter) {
46435
- return (inferInstanceTypeArgumentsAsConstraint) ? getBaseConstraintOfType(typeParameter) || unknownType : anyType;
46436
- });
46437
- return createTypeReference(classType, typeArguments);
46438
- }
46439
46400
  function getTypeOfPrototypeProperty(prototype) {
46440
- var classSymbol = getParentOfSymbol(prototype);
46441
- return getInstanceTypeOfClassSymbol(classSymbol);
46401
+ var classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
46402
+ return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType;
46442
46403
  }
46443
46404
  function getTypeOfPropertyOfType(type, name) {
46444
46405
  var prop = getPropertyOfType(type, name);
@@ -47065,7 +47026,7 @@ var ts;
47065
47026
  if (reportErrors && !declarationBelongsToPrivateAmbientMember(element)) {
47066
47027
  reportImplicitAny(element, anyType);
47067
47028
  }
47068
- return includePatternInType ? nonInferrableAnyType : anyType;
47029
+ return anyType;
47069
47030
  }
47070
47031
  function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
47071
47032
  var members = ts.createSymbolTable();
@@ -49076,6 +49037,9 @@ var ts;
49076
49037
  else if (type.objectFlags & 32) {
49077
49038
  resolveMappedTypeMembers(type);
49078
49039
  }
49040
+ else {
49041
+ ts.Debug.fail("Unhandled object type " + ts.Debug.formatObjectFlags(type.objectFlags));
49042
+ }
49079
49043
  }
49080
49044
  else if (type.flags & 1048576) {
49081
49045
  resolveUnionTypeMembers(type);
@@ -49083,6 +49047,9 @@ var ts;
49083
49047
  else if (type.flags & 2097152) {
49084
49048
  resolveIntersectionTypeMembers(type);
49085
49049
  }
49050
+ else {
49051
+ ts.Debug.fail("Unhandled type " + ts.Debug.formatTypeFlags(type.flags));
49052
+ }
49086
49053
  }
49087
49054
  return type;
49088
49055
  }
@@ -49752,12 +49719,15 @@ var ts;
49752
49719
  return getApplicableIndexInfo(type, isLateBoundName(name) ? esSymbolType : getStringLiteralType(ts.unescapeLeadingUnderscores(name)));
49753
49720
  }
49754
49721
  function getTypeParametersFromDeclaration(declaration) {
49722
+ var _a;
49755
49723
  var result;
49756
- for (var _i = 0, _a = ts.getEffectiveTypeParameterDeclarations(declaration); _i < _a.length; _i++) {
49757
- var node = _a[_i];
49724
+ for (var _i = 0, _b = ts.getEffectiveTypeParameterDeclarations(declaration); _i < _b.length; _i++) {
49725
+ var node = _b[_i];
49758
49726
  result = ts.appendIfUnique(result, getDeclaredTypeOfTypeParameter(node.symbol));
49759
49727
  }
49760
- return result;
49728
+ return (result === null || result === void 0 ? void 0 : result.length) ? result
49729
+ : ts.isFunctionDeclaration(declaration) ? (_a = getSignatureOfTypeTag(declaration)) === null || _a === void 0 ? void 0 : _a.typeParameters
49730
+ : undefined;
49761
49731
  }
49762
49732
  function symbolsToArray(symbols) {
49763
49733
  var result = [];
@@ -50367,7 +50337,7 @@ var ts;
50367
50337
  var result = 0;
50368
50338
  for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
50369
50339
  var type = types_8[_i];
50370
- if (!(type.flags & excludeKinds)) {
50340
+ if (excludeKinds === undefined || !(type.flags & excludeKinds)) {
50371
50341
  result |= ts.getObjectFlags(type);
50372
50342
  }
50373
50343
  }
@@ -50379,7 +50349,7 @@ var ts;
50379
50349
  if (!type) {
50380
50350
  type = createObjectType(4, target.symbol);
50381
50351
  target.instantiations.set(id, type);
50382
- type.objectFlags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments, 0) : 0;
50352
+ type.objectFlags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments) : 0;
50383
50353
  type.target = target;
50384
50354
  type.resolvedTypeArguments = typeArguments;
50385
50355
  }
@@ -53439,6 +53409,7 @@ var ts;
53439
53409
  result.mapper = mapper;
53440
53410
  result.aliasSymbol = aliasSymbol || type.aliasSymbol;
53441
53411
  result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
53412
+ result.objectFlags |= result.aliasTypeArguments ? getPropagatingFlagsOfTypes(result.aliasTypeArguments) : 0;
53442
53413
  return result;
53443
53414
  }
53444
53415
  function getConditionalTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {
@@ -56858,7 +56829,7 @@ var ts;
56858
56829
  if (!isLiteralOfContextualType(type, contextualType)) {
56859
56830
  type = getWidenedUniqueESSymbolType(getWidenedLiteralType(type));
56860
56831
  }
56861
- return type;
56832
+ return getRegularTypeOfLiteralType(type);
56862
56833
  }
56863
56834
  function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) {
56864
56835
  if (type && isUnitType(type)) {
@@ -57707,8 +57678,10 @@ var ts;
57707
57678
  propagationType = savePropagationType;
57708
57679
  return;
57709
57680
  }
57710
- if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
57711
- inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments, getAliasVariances(source.aliasSymbol));
57681
+ if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {
57682
+ if (source.aliasTypeArguments) {
57683
+ inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments, getAliasVariances(source.aliasSymbol));
57684
+ }
57712
57685
  return;
57713
57686
  }
57714
57687
  if (source === target && source.flags & 3145728) {
@@ -57745,7 +57718,7 @@ var ts;
57745
57718
  target = getActualTypeVariable(target);
57746
57719
  }
57747
57720
  if (target.flags & 8650752) {
57748
- if (source === nonInferrableAnyType || source === silentNeverType || (priority & 128 && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) {
57721
+ if (isFromInferenceBlockedSource(source)) {
57749
57722
  return;
57750
57723
  }
57751
57724
  var inference = getInferenceInfoForType(target);
@@ -57800,15 +57773,11 @@ var ts;
57800
57773
  inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target));
57801
57774
  }
57802
57775
  else if (source.flags & 4194304 && target.flags & 4194304) {
57803
- contravariant = !contravariant;
57804
- inferFromTypes(source.type, target.type);
57805
- contravariant = !contravariant;
57776
+ inferFromContravariantTypes(source.type, target.type);
57806
57777
  }
57807
57778
  else if ((isLiteralType(source) || source.flags & 4) && target.flags & 4194304) {
57808
57779
  var empty = createEmptyObjectTypeFromStringLiteral(source);
57809
- contravariant = !contravariant;
57810
- inferWithPriority(empty, target.type, 256);
57811
- contravariant = !contravariant;
57780
+ inferFromContravariantTypesWithPriority(empty, target.type, 256);
57812
57781
  }
57813
57782
  else if (source.flags & 8388608 && target.flags & 8388608) {
57814
57783
  inferFromTypes(source.objectType, target.objectType);
@@ -57821,10 +57790,7 @@ var ts;
57821
57790
  }
57822
57791
  else if (source.flags & 33554432) {
57823
57792
  inferFromTypes(source.baseType, target);
57824
- var oldPriority = priority;
57825
- priority |= 4;
57826
- inferFromTypes(source.substitute, target);
57827
- priority = oldPriority;
57793
+ inferWithPriority(source.substitute, target, 4);
57828
57794
  }
57829
57795
  else if (target.flags & 16777216) {
57830
57796
  invokeOnce(source, target, inferToConditionalType);
@@ -57863,6 +57829,18 @@ var ts;
57863
57829
  inferFromTypes(source, target);
57864
57830
  priority = savePriority;
57865
57831
  }
57832
+ function inferFromContravariantTypesWithPriority(source, target, newPriority) {
57833
+ var savePriority = priority;
57834
+ priority |= newPriority;
57835
+ inferFromContravariantTypes(source, target);
57836
+ priority = savePriority;
57837
+ }
57838
+ function inferToMultipleTypesWithPriority(source, targets, targetFlags, newPriority) {
57839
+ var savePriority = priority;
57840
+ priority |= newPriority;
57841
+ inferToMultipleTypes(source, targets, targetFlags);
57842
+ priority = savePriority;
57843
+ }
57866
57844
  function invokeOnce(source, target, action) {
57867
57845
  var key = source.id + "," + target.id;
57868
57846
  var status = visited && visited.get(key);
@@ -57925,10 +57903,13 @@ var ts;
57925
57903
  }
57926
57904
  }
57927
57905
  function inferFromContravariantTypes(source, target) {
57906
+ contravariant = !contravariant;
57907
+ inferFromTypes(source, target);
57908
+ contravariant = !contravariant;
57909
+ }
57910
+ function inferFromContravariantTypesIfStrictFunctionTypes(source, target) {
57928
57911
  if (strictFunctionTypes || priority & 1024) {
57929
- contravariant = !contravariant;
57930
- inferFromTypes(source, target);
57931
- contravariant = !contravariant;
57912
+ inferFromContravariantTypes(source, target);
57932
57913
  }
57933
57914
  else {
57934
57915
  inferFromTypes(source, target);
@@ -58059,11 +58040,8 @@ var ts;
58059
58040
  inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target));
58060
58041
  }
58061
58042
  else {
58062
- var savePriority = priority;
58063
- priority |= contravariant ? 64 : 0;
58064
58043
  var targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
58065
- inferToMultipleTypes(source, targetTypes, target.flags);
58066
- priority = savePriority;
58044
+ inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 : 0);
58067
58045
  }
58068
58046
  }
58069
58047
  function inferToTemplateLiteralType(source, target) {
@@ -58214,19 +58192,16 @@ var ts;
58214
58192
  var sourceLen = sourceSignatures.length;
58215
58193
  var targetLen = targetSignatures.length;
58216
58194
  var len = sourceLen < targetLen ? sourceLen : targetLen;
58217
- var skipParameters = !!(ts.getObjectFlags(source) & 262144);
58218
58195
  for (var i = 0; i < len; i++) {
58219
- inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]), skipParameters);
58196
+ inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]));
58220
58197
  }
58221
58198
  }
58222
- function inferFromSignature(source, target, skipParameters) {
58223
- if (!skipParameters) {
58224
- var saveBivariant = bivariant;
58225
- var kind = target.declaration ? target.declaration.kind : 0;
58226
- bivariant = bivariant || kind === 169 || kind === 168 || kind === 171;
58227
- applyToParameterTypes(source, target, inferFromContravariantTypes);
58228
- bivariant = saveBivariant;
58229
- }
58199
+ function inferFromSignature(source, target) {
58200
+ var saveBivariant = bivariant;
58201
+ var kind = target.declaration ? target.declaration.kind : 0;
58202
+ bivariant = bivariant || kind === 169 || kind === 168 || kind === 171;
58203
+ applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes);
58204
+ bivariant = saveBivariant;
58230
58205
  applyToReturnTypes(source, target, inferFromTypes);
58231
58206
  }
58232
58207
  function inferFromIndexTypes(source, target) {
@@ -59552,7 +59527,7 @@ var ts;
59552
59527
  return declaredType;
59553
59528
  }
59554
59529
  if (ts.isVariableDeclaration(node) && node.parent.parent.kind === 243 && isMatchingReference(reference, node.parent.parent.expression)) {
59555
- return getNonNullableTypeIfNeeded(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)));
59530
+ return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent))));
59556
59531
  }
59557
59532
  return undefined;
59558
59533
  }
@@ -59975,10 +59950,10 @@ var ts;
59975
59950
  if (symbol === undefined) {
59976
59951
  return type;
59977
59952
  }
59978
- var classSymbol = getParentOfSymbol(symbol);
59953
+ var classSymbol = symbol.parent;
59979
59954
  var targetType = ts.hasStaticModifier(ts.Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration"))
59980
59955
  ? getTypeOfSymbol(classSymbol)
59981
- : getInstanceTypeOfClassSymbol(classSymbol);
59956
+ : getDeclaredTypeOfSymbol(classSymbol);
59982
59957
  return getNarrowedType(type, targetType, assumeTrue, true);
59983
59958
  }
59984
59959
  function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) {
@@ -60200,16 +60175,23 @@ var ts;
60200
60175
  if (!assumeTrue) {
60201
60176
  return filterType(type, function (t) { return !isRelated(t, candidate); });
60202
60177
  }
60203
- if (type.flags & 1048576) {
60204
- var assignableType = filterType(type, function (t) { return isRelated(t, candidate); });
60205
- if (!(assignableType.flags & 131072)) {
60206
- return assignableType;
60207
- }
60178
+ if (type.flags & 3) {
60179
+ return candidate;
60208
60180
  }
60209
- return isTypeSubtypeOf(candidate, type) ? candidate :
60210
- isTypeAssignableTo(type, candidate) ? type :
60211
- isTypeAssignableTo(candidate, type) ? candidate :
60212
- getIntersectionType([type, candidate]);
60181
+ var keyPropertyName = type.flags & 1048576 ? getKeyPropertyName(type) : undefined;
60182
+ var narrowedType = mapType(candidate, function (c) {
60183
+ var discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName);
60184
+ var matching = discriminant && getConstituentTypeForKeyType(type, discriminant);
60185
+ var directlyRelated = mapType(matching || type, function (t) { return isRelated(t, c) ? t : isRelated(c, t) ? c : neverType; });
60186
+ return directlyRelated.flags & 131072 ?
60187
+ mapType(type, function (t) { return maybeTypeOfKind(t, 465829888) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType; }) :
60188
+ directlyRelated;
60189
+ });
60190
+ return !(narrowedType.flags & 131072) ? narrowedType :
60191
+ isTypeSubtypeOf(candidate, type) ? candidate :
60192
+ isTypeAssignableTo(type, candidate) ? type :
60193
+ isTypeAssignableTo(candidate, type) ? candidate :
60194
+ getIntersectionType([type, candidate]);
60213
60195
  }
60214
60196
  function narrowTypeByCallExpression(type, callExpression, assumeTrue) {
60215
60197
  if (hasMatchingArgument(callExpression, reference)) {
@@ -61309,6 +61291,14 @@ var ts;
61309
61291
  var lhsType = getTypeOfExpression(e.expression);
61310
61292
  return ts.isPrivateIdentifier(e.name) ? tryGetPrivateIdentifierPropertyOfType(lhsType, e.name) : getPropertyOfType(lhsType, e.name.escapedText);
61311
61293
  }
61294
+ if (ts.isElementAccessExpression(e)) {
61295
+ var propType = checkExpressionCached(e.argumentExpression);
61296
+ if (!isTypeUsableAsPropertyName(propType)) {
61297
+ return undefined;
61298
+ }
61299
+ var lhsType = getTypeOfExpression(e.expression);
61300
+ return getPropertyOfType(lhsType, getPropertyNameFromType(propType));
61301
+ }
61312
61302
  return undefined;
61313
61303
  function tryGetPrivateIdentifierPropertyOfType(type, id) {
61314
61304
  var lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(id.escapedText, id);
@@ -64253,7 +64243,7 @@ var ts;
64253
64243
  var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
64254
64244
  var reportErrors = !candidatesOutArray;
64255
64245
  var typeArguments;
64256
- if (!isDecorator) {
64246
+ if (!isDecorator && !ts.isSuperCall(node)) {
64257
64247
  typeArguments = node.typeArguments;
64258
64248
  if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106) {
64259
64249
  ts.forEach(typeArguments, checkSourceElement);
@@ -65085,7 +65075,7 @@ var ts;
65085
65075
  checkGrammarTypeArguments(node, node.typeArguments);
65086
65076
  var signature = getResolvedSignature(node, undefined, checkMode);
65087
65077
  if (signature === resolvingSignature) {
65088
- return nonInferrableType;
65078
+ return silentNeverType;
65089
65079
  }
65090
65080
  checkDeprecatedSignature(signature, node);
65091
65081
  if (node.expression.kind === 106) {
@@ -66361,7 +66351,7 @@ var ts;
66361
66351
  error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
66362
66352
  }
66363
66353
  if (node.operator === 39) {
66364
- if (maybeTypeOfKind(operandType, 2112)) {
66354
+ if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112)) {
66365
66355
  error(node.operand, ts.Diagnostics.Operator_0_cannot_be_applied_to_type_1, ts.tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType)));
66366
66356
  }
66367
66357
  return numberType;
@@ -70765,9 +70755,14 @@ var ts;
70765
70755
  function unwrapReturnType(returnType, functionFlags) {
70766
70756
  var isGenerator = !!(functionFlags & 1);
70767
70757
  var isAsync = !!(functionFlags & 2);
70768
- return isGenerator ? getIterationTypeOfGeneratorFunctionReturnType(1, returnType, isAsync) || errorType :
70769
- isAsync ? getAwaitedTypeNoAlias(returnType) || errorType :
70770
- returnType;
70758
+ if (isGenerator) {
70759
+ var returnIterationType = getIterationTypeOfGeneratorFunctionReturnType(1, returnType, isAsync);
70760
+ if (!returnIterationType) {
70761
+ return errorType;
70762
+ }
70763
+ return isAsync ? getAwaitedTypeNoAlias(unwrapAwaitedType(returnIterationType)) : returnIterationType;
70764
+ }
70765
+ return isAsync ? getAwaitedTypeNoAlias(returnType) || errorType : returnType;
70771
70766
  }
70772
70767
  function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
70773
70768
  var unwrappedReturnType = unwrapReturnType(returnType, ts.getFunctionFlags(func));