@typescript-deploys/pr-build 5.5.0-pr-58025-3 → 5.5.0-pr-58028-14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240401`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240402`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3924,7 +3924,6 @@ var commentPragmas = {
3924
3924
  kind: 4 /* MultiLine */
3925
3925
  }
3926
3926
  };
3927
- var _optionsType = [void 0][0];
3928
3927
 
3929
3928
  // src/compiler/sys.ts
3930
3929
  function generateDjb2Hash(data) {
@@ -7370,6 +7369,7 @@ var Diagnostics = {
7370
7369
  Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* 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."),
7371
7370
  Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
7372
7371
  Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
7372
+ Default_type_arguments_to_parameter_s_constraint_or_unknown_instead_of_any_for_instance_checks: diag(6805, 3 /* Message */, "Default_type_arguments_to_parameter_s_constraint_or_unknown_instead_of_any_for_instance_checks_6805", "Default type arguments to parameter's constraint or 'unknown' instead of 'any' for instance checks."),
7373
7373
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
7374
7374
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7375
7375
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -16597,6 +16597,12 @@ var computedOptions = createComputedCompilerOptions({
16597
16597
  computeValue: (compilerOptions) => {
16598
16598
  return getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
16599
16599
  }
16600
+ },
16601
+ strictInstanceOfTypeParameters: {
16602
+ dependencies: ["strict"],
16603
+ computeValue: (compilerOptions) => {
16604
+ return getStrictOptionValue(compilerOptions, "strictInstanceOfTypeParameters");
16605
+ }
16600
16606
  }
16601
16607
  });
16602
16608
  var getEmitScriptTarget = computedOptions.target.computeValue;
@@ -33838,16 +33844,13 @@ var compileOnSaveCommandLineOption = {
33838
33844
  type: "boolean",
33839
33845
  defaultValueDescription: false
33840
33846
  };
33841
- function strongMap(input) {
33842
- return new Map(Object.entries(input));
33843
- }
33844
- var jsxOptionMap = strongMap({
33847
+ var jsxOptionMap = new Map(Object.entries({
33845
33848
  "preserve": 1 /* Preserve */,
33846
33849
  "react-native": 3 /* ReactNative */,
33847
33850
  "react": 2 /* React */,
33848
33851
  "react-jsx": 4 /* ReactJSX */,
33849
33852
  "react-jsxdev": 5 /* ReactJSXDev */
33850
- });
33853
+ }));
33851
33854
  var inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => ["" + value, key]));
33852
33855
  var libEntries = [
33853
33856
  // JavaScript only
@@ -33945,38 +33948,38 @@ var libMap = new Map(libEntries);
33945
33948
  var optionsForWatch = [
33946
33949
  {
33947
33950
  name: "watchFile",
33948
- type: strongMap({
33951
+ type: new Map(Object.entries({
33949
33952
  fixedpollinginterval: 0 /* FixedPollingInterval */,
33950
33953
  prioritypollinginterval: 1 /* PriorityPollingInterval */,
33951
33954
  dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
33952
33955
  fixedchunksizepolling: 3 /* FixedChunkSizePolling */,
33953
33956
  usefsevents: 4 /* UseFsEvents */,
33954
33957
  usefseventsonparentdirectory: 5 /* UseFsEventsOnParentDirectory */
33955
- }),
33958
+ })),
33956
33959
  category: Diagnostics.Watch_and_Build_Modes,
33957
33960
  description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
33958
33961
  defaultValueDescription: 4 /* UseFsEvents */
33959
33962
  },
33960
33963
  {
33961
33964
  name: "watchDirectory",
33962
- type: strongMap({
33965
+ type: new Map(Object.entries({
33963
33966
  usefsevents: 0 /* UseFsEvents */,
33964
33967
  fixedpollinginterval: 1 /* FixedPollingInterval */,
33965
33968
  dynamicprioritypolling: 2 /* DynamicPriorityPolling */,
33966
33969
  fixedchunksizepolling: 3 /* FixedChunkSizePolling */
33967
- }),
33970
+ })),
33968
33971
  category: Diagnostics.Watch_and_Build_Modes,
33969
33972
  description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
33970
33973
  defaultValueDescription: 0 /* UseFsEvents */
33971
33974
  },
33972
33975
  {
33973
33976
  name: "fallbackPolling",
33974
- type: strongMap({
33977
+ type: new Map(Object.entries({
33975
33978
  fixedinterval: 0 /* FixedInterval */,
33976
33979
  priorityinterval: 1 /* PriorityInterval */,
33977
33980
  dynamicpriority: 2 /* DynamicPriority */,
33978
33981
  fixedchunksize: 3 /* FixedChunkSize */
33979
- }),
33982
+ })),
33980
33983
  category: Diagnostics.Watch_and_Build_Modes,
33981
33984
  description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
33982
33985
  defaultValueDescription: 1 /* PriorityInterval */
@@ -34202,7 +34205,7 @@ var commonOptionsWithBuild = [
34202
34205
  var targetOptionDeclaration = {
34203
34206
  name: "target",
34204
34207
  shortName: "t",
34205
- type: strongMap({
34208
+ type: new Map(Object.entries({
34206
34209
  es3: 0 /* ES3 */,
34207
34210
  es5: 1 /* ES5 */,
34208
34211
  es6: 2 /* ES2015 */,
@@ -34215,7 +34218,7 @@ var targetOptionDeclaration = {
34215
34218
  es2021: 8 /* ES2021 */,
34216
34219
  es2022: 9 /* ES2022 */,
34217
34220
  esnext: 99 /* ESNext */
34218
- }),
34221
+ })),
34219
34222
  affectsSourceFile: true,
34220
34223
  affectsModuleResolution: true,
34221
34224
  affectsEmit: true,
@@ -34230,7 +34233,7 @@ var targetOptionDeclaration = {
34230
34233
  var moduleOptionDeclaration = {
34231
34234
  name: "module",
34232
34235
  shortName: "m",
34233
- type: strongMap({
34236
+ type: new Map(Object.entries({
34234
34237
  none: 0 /* None */,
34235
34238
  commonjs: 1 /* CommonJS */,
34236
34239
  amd: 2 /* AMD */,
@@ -34244,7 +34247,7 @@ var moduleOptionDeclaration = {
34244
34247
  node16: 100 /* Node16 */,
34245
34248
  nodenext: 199 /* NodeNext */,
34246
34249
  preserve: 200 /* Preserve */
34247
- }),
34250
+ })),
34248
34251
  affectsSourceFile: true,
34249
34252
  affectsModuleResolution: true,
34250
34253
  affectsEmit: true,
@@ -34463,11 +34466,11 @@ var commandOptionsWithoutBuild = [
34463
34466
  },
34464
34467
  {
34465
34468
  name: "importsNotUsedAsValues",
34466
- type: strongMap({
34469
+ type: new Map(Object.entries({
34467
34470
  remove: 0 /* Remove */,
34468
34471
  preserve: 1 /* Preserve */,
34469
34472
  error: 2 /* Error */
34470
- }),
34473
+ })),
34471
34474
  affectsEmit: true,
34472
34475
  affectsSemanticDiagnostics: true,
34473
34476
  affectsBuildInfo: true,
@@ -34566,6 +34569,16 @@ var commandOptionsWithoutBuild = [
34566
34569
  description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
34567
34570
  defaultValueDescription: Diagnostics.false_unless_strict_is_set
34568
34571
  },
34572
+ {
34573
+ name: "strictInstanceOfTypeParameters",
34574
+ type: "boolean",
34575
+ affectsSemanticDiagnostics: true,
34576
+ affectsBuildInfo: true,
34577
+ strictFlag: true,
34578
+ category: Diagnostics.Type_Checking,
34579
+ description: Diagnostics.Default_type_arguments_to_parameter_s_constraint_or_unknown_instead_of_any_for_instance_checks,
34580
+ defaultValueDescription: false
34581
+ },
34569
34582
  {
34570
34583
  name: "noImplicitThis",
34571
34584
  type: "boolean",
@@ -34675,7 +34688,7 @@ var commandOptionsWithoutBuild = [
34675
34688
  // Module Resolution
34676
34689
  {
34677
34690
  name: "moduleResolution",
34678
- type: strongMap({
34691
+ type: new Map(Object.entries({
34679
34692
  // N.B. The first entry specifies the value shown in `tsc --init`
34680
34693
  node10: 2 /* Node10 */,
34681
34694
  node: 2 /* Node10 */,
@@ -34683,7 +34696,7 @@ var commandOptionsWithoutBuild = [
34683
34696
  node16: 3 /* Node16 */,
34684
34697
  nodenext: 99 /* NodeNext */,
34685
34698
  bundler: 100 /* Bundler */
34686
- }),
34699
+ })),
34687
34700
  deprecatedKeys: /* @__PURE__ */ new Set(["node"]),
34688
34701
  affectsSourceFile: true,
34689
34702
  affectsModuleResolution: true,
@@ -34979,10 +34992,10 @@ var commandOptionsWithoutBuild = [
34979
34992
  },
34980
34993
  {
34981
34994
  name: "newLine",
34982
- type: strongMap({
34995
+ type: new Map(Object.entries({
34983
34996
  crlf: 0 /* CarriageReturnLineFeed */,
34984
34997
  lf: 1 /* LineFeed */
34985
- }),
34998
+ })),
34986
34999
  affectsEmit: true,
34987
35000
  affectsBuildInfo: true,
34988
35001
  paramType: Diagnostics.NEWLINE,
@@ -35223,11 +35236,11 @@ var commandOptionsWithoutBuild = [
35223
35236
  },
35224
35237
  {
35225
35238
  name: "moduleDetection",
35226
- type: strongMap({
35239
+ type: new Map(Object.entries({
35227
35240
  auto: 2 /* Auto */,
35228
35241
  legacy: 1 /* Legacy */,
35229
35242
  force: 3 /* Force */
35230
- }),
35243
+ })),
35231
35244
  affectsSourceFile: true,
35232
35245
  affectsModuleResolution: true,
35233
35246
  description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files,
@@ -35599,10 +35612,7 @@ function getDiagnosticText(message, ...args) {
35599
35612
  return cast(createCompilerDiagnostic(message, ...args).messageText, isString);
35600
35613
  }
35601
35614
  function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
35602
- const typeConfig = hasTSFileExtension(configFileName) || hasJSFileExtension(configFileName) ? loadConfigFromDefaultType(
35603
- configFileName
35604
- ) : void 0;
35605
- const configFileText = typeConfig ? typeConfig.configText : tryReadFile(configFileName, (fileName) => host.readFile(fileName));
35615
+ const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName));
35606
35616
  if (!isString(configFileText)) {
35607
35617
  host.onUnRecoverableConfigFileDiagnostic(configFileText);
35608
35618
  return void 0;
@@ -35612,7 +35622,7 @@ function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host,
35612
35622
  result.path = toPath(configFileName, cwd, createGetCanonicalFileName(host.useCaseSensitiveFileNames));
35613
35623
  result.resolvedPath = result.path;
35614
35624
  result.originalFileName = result.fileName;
35615
- const parsedResult = parseJsonSourceFileConfigFileContent(
35625
+ return parseJsonSourceFileConfigFileContent(
35616
35626
  result,
35617
35627
  host,
35618
35628
  getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd),
@@ -35624,64 +35634,6 @@ function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host,
35624
35634
  extendedConfigCache,
35625
35635
  watchOptionsToExtend
35626
35636
  );
35627
- parsedResult.errors = concatenate(parsedResult.errors, typeConfig == null ? void 0 : typeConfig.errors);
35628
- return parsedResult;
35629
- }
35630
- function loadConfigFromDefaultType(configFileName) {
35631
- const program = createProgram({
35632
- rootNames: [configFileName],
35633
- options: {
35634
- strict: true,
35635
- exactOptionalPropertyTypes: true,
35636
- noEmit: true,
35637
- module: 199 /* NodeNext */,
35638
- target: 99 /* Latest */,
35639
- allowJs: true,
35640
- resolveJsonModule: true,
35641
- allowArbitraryExtensions: true,
35642
- lib: ["esnext"],
35643
- types: [],
35644
- moduleDetection: 3 /* Force */
35645
- }
35646
- // TODO: Use passed-in host object instead of sys
35647
- });
35648
- const file = Debug.checkDefined(program.getSourceFile(configFileName));
35649
- const checker = program.getTypeChecker();
35650
- const defaultMember = checker.tryGetMemberInModuleExports("default" /* Default */, file.symbol);
35651
- if (!defaultMember) {
35652
- return void 0;
35653
- }
35654
- const type = checker.getTypeOfSymbol(defaultMember);
35655
- const raw = convertTypeIntoRawConfig(checker, type);
35656
- return {
35657
- errors: program.getSemanticDiagnostics(file).slice(),
35658
- configText: JSON.stringify(raw)
35659
- };
35660
- }
35661
- function convertTypeIntoRawConfig(checker, type) {
35662
- return convertType(type);
35663
- function convertType(type2) {
35664
- if (type2.flags & 512 /* BooleanLiteral */) {
35665
- return type2.intrinsicName === "true" ? true : false;
35666
- }
35667
- if (type2.flags & 256 /* NumberLiteral */ || type2.flags & 128 /* StringLiteral */) {
35668
- return type2.value;
35669
- }
35670
- if (checker.isTupleType(type2)) {
35671
- const args = checker.getTypeArguments(type2);
35672
- return map(args, convertType);
35673
- }
35674
- if (type2.flags & 524288 /* Object */) {
35675
- const result = {};
35676
- const members = checker.getPropertiesOfType(type2);
35677
- for (const member of members) {
35678
- const name = symbolName(member);
35679
- result[name] = convertType(checker.getTypeOfSymbol(member));
35680
- }
35681
- return result;
35682
- }
35683
- return void 0;
35684
- }
35685
35637
  }
35686
35638
  function parseConfigFileTextToJson(fileName, jsonText) {
35687
35639
  const jsonSourceFile = parseJsonText(fileName, jsonText);
@@ -43540,7 +43492,7 @@ function createTypeChecker(host) {
43540
43492
  var requestedExternalEmitHelpers;
43541
43493
  var externalHelpersModule;
43542
43494
  var Symbol12 = objectAllocator.getSymbolConstructor();
43543
- var Type8 = objectAllocator.getTypeConstructor();
43495
+ var Type7 = objectAllocator.getTypeConstructor();
43544
43496
  var Signature5 = objectAllocator.getSignatureConstructor();
43545
43497
  var typeCount = 0;
43546
43498
  var symbolCount = 0;
@@ -43567,6 +43519,7 @@ function createTypeChecker(host) {
43567
43519
  var noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
43568
43520
  var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
43569
43521
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
43522
+ var strictInstanceOfTypeParameters = getStrictOptionValue(compilerOptions, "strictInstanceOfTypeParameters");
43570
43523
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
43571
43524
  var checkBinaryExpression = createCheckBinaryExpression();
43572
43525
  var emitResolver = createResolver();
@@ -47454,7 +47407,7 @@ function createTypeChecker(host) {
47454
47407
  }
47455
47408
  function createType(flags) {
47456
47409
  var _a;
47457
- const result = new Type8(checker, flags);
47410
+ const result = new Type7(checker, flags);
47458
47411
  typeCount++;
47459
47412
  result.id = typeCount;
47460
47413
  (_a = tracing) == null ? void 0 : _a.recordType(result);
@@ -47466,7 +47419,7 @@ function createTypeChecker(host) {
47466
47419
  return result;
47467
47420
  }
47468
47421
  function createOriginType(flags) {
47469
- return new Type8(checker, flags);
47422
+ return new Type7(checker, flags);
47470
47423
  }
47471
47424
  function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
47472
47425
  checkIntrinsicName(intrinsicName, debugIntrinsicName);
@@ -52098,9 +52051,32 @@ function createTypeChecker(host) {
52098
52051
  }
52099
52052
  }).parent;
52100
52053
  }
52054
+ function getInstanceTypeOfClassSymbol(classSymbol) {
52055
+ const classType = getDeclaredTypeOfSymbol(classSymbol);
52056
+ const objectFlags = getObjectFlags(classType);
52057
+ if (!(objectFlags & 3 /* ClassOrInterface */) || !classType.typeParameters) {
52058
+ return classType;
52059
+ }
52060
+ const variances = getVariances(classType);
52061
+ const isJs = some(classSymbol.declarations, isInJSFile);
52062
+ const inferredTypes = calculateInferredTypeArguments(classType.typeParameters, isJs);
52063
+ const typeArguments = map(inferredTypes, (inferredType, i) => {
52064
+ if (!strictInstanceOfTypeParameters) {
52065
+ return anyType;
52066
+ }
52067
+ const variance = variances[i];
52068
+ switch (variance & 7 /* VarianceMask */) {
52069
+ case 2 /* Contravariant */:
52070
+ case 3 /* Bivariant */:
52071
+ return neverType;
52072
+ }
52073
+ return inferredType || unknownType;
52074
+ });
52075
+ return createTypeReference(classType, typeArguments);
52076
+ }
52101
52077
  function getTypeOfPrototypeProperty(prototype) {
52102
- const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
52103
- return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, (_) => anyType)) : classType;
52078
+ const classSymbol = getParentOfSymbol(prototype);
52079
+ return getInstanceTypeOfClassSymbol(classSymbol);
52104
52080
  }
52105
52081
  function getTypeOfPropertyOfType(type, name) {
52106
52082
  const prop = getPropertyOfType(type, name);
@@ -55801,6 +55777,26 @@ function createTypeChecker(host) {
55801
55777
  }
55802
55778
  return typeArguments && typeArguments.slice();
55803
55779
  }
55780
+ function calculateInferredTypeArguments(typeParameters, isJavaScriptImplicitAny) {
55781
+ const numTypeParameters = length(typeParameters);
55782
+ if (!numTypeParameters) {
55783
+ return [];
55784
+ }
55785
+ const result = [];
55786
+ for (let i = 0; i < numTypeParameters; i++) {
55787
+ result[i] = errorType;
55788
+ }
55789
+ const baseDefaultType = getDefaultTypeArgumentType(isJavaScriptImplicitAny);
55790
+ for (let i = 0; i < numTypeParameters; i++) {
55791
+ let inferredType = getBaseConstraintOfType(typeParameters[i]);
55792
+ if (isJavaScriptImplicitAny && inferredType && (isTypeIdenticalTo(inferredType, unknownType) || isTypeIdenticalTo(inferredType, emptyObjectType))) {
55793
+ inferredType = anyType;
55794
+ }
55795
+ result[i] = inferredType ? instantiateType(inferredType, createTypeMapper(typeParameters, result)) : baseDefaultType;
55796
+ }
55797
+ result.length = typeParameters.length;
55798
+ return result;
55799
+ }
55804
55800
  function getSignatureFromDeclaration(declaration) {
55805
55801
  const links = getNodeLinks(declaration);
55806
55802
  if (!links.resolvedSignature) {
@@ -63442,6 +63438,9 @@ function createTypeChecker(host) {
63442
63438
  const resolved = resolveStructuredTypeMembers(type);
63443
63439
  return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && resolved.indexInfos.length === 0 && resolved.properties.length > 0 && every(resolved.properties, (p) => !!(p.flags & 16777216 /* Optional */));
63444
63440
  }
63441
+ if (type.flags & 33554432 /* Substitution */) {
63442
+ return isWeakType(type.baseType);
63443
+ }
63445
63444
  if (type.flags & 2097152 /* Intersection */) {
63446
63445
  return every(type.types, isWeakType);
63447
63446
  }
@@ -67107,8 +67106,8 @@ function createTypeChecker(host) {
67107
67106
  if (symbol === void 0) {
67108
67107
  return type;
67109
67108
  }
67110
- const classSymbol = symbol.parent;
67111
- const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration")) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol);
67109
+ const classSymbol = getParentOfSymbol(symbol);
67110
+ const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration")) ? getTypeOfSymbol(classSymbol) : getInstanceTypeOfClassSymbol(classSymbol);
67112
67111
  return getNarrowedType(
67113
67112
  type,
67114
67113
  targetType,
@@ -70410,7 +70409,11 @@ function createTypeChecker(host) {
70410
70409
  if (getPropertyOfObjectType(targetType, name) || getApplicableIndexInfoForName(targetType, name) || isLateBoundName(name) && getIndexInfoOfType(targetType, stringType) || isComparingJsxAttributes && isHyphenatedJsxName(name)) {
70411
70410
  return true;
70412
70411
  }
70413
- } else if (targetType.flags & 3145728 /* UnionOrIntersection */ && isExcessPropertyCheckTarget(targetType)) {
70412
+ }
70413
+ if (targetType.flags & 33554432 /* Substitution */) {
70414
+ return isKnownProperty(targetType.baseType, name, isComparingJsxAttributes);
70415
+ }
70416
+ if (targetType.flags & 3145728 /* UnionOrIntersection */ && isExcessPropertyCheckTarget(targetType)) {
70414
70417
  for (const t of targetType.types) {
70415
70418
  if (isKnownProperty(t, name, isComparingJsxAttributes)) {
70416
70419
  return true;
@@ -70420,7 +70423,7 @@ function createTypeChecker(host) {
70420
70423
  return false;
70421
70424
  }
70422
70425
  function isExcessPropertyCheckTarget(type) {
70423
- return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 512 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget));
70426
+ return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 512 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 33554432 /* Substitution */ && isExcessPropertyCheckTarget(type.baseType) || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget));
70424
70427
  }
70425
70428
  function checkJsxExpression(node, checkMode) {
70426
70429
  checkGrammarJsxExpression(node);
@@ -3574,7 +3574,6 @@ declare namespace ts {
3574
3574
  interface SortedArray<T> extends Array<T> {
3575
3575
  " __sortedArrayBrand": any;
3576
3576
  }
3577
- function config<const T extends RawTSConfig>(config: T): T;
3578
3577
  type Path = string & {
3579
3578
  __pathBrand: any;
3580
3579
  };
@@ -6980,6 +6979,7 @@ declare namespace ts {
6980
6979
  strictBindCallApply?: boolean;
6981
6980
  strictNullChecks?: boolean;
6982
6981
  strictPropertyInitialization?: boolean;
6982
+ strictInstanceOfTypeParameters?: boolean;
6983
6983
  stripInternal?: boolean;
6984
6984
  /** @deprecated */
6985
6985
  suppressExcessPropertyErrors?: boolean;
@@ -8141,230 +8141,6 @@ declare namespace ts {
8141
8141
  */
8142
8142
  ParseForTypeInfo = 3,
8143
8143
  }
8144
- const _optionsType: {
8145
- help?: boolean | undefined;
8146
- watch?: boolean | undefined;
8147
- preserveWatchOutput?: boolean | undefined;
8148
- listFiles?: boolean | undefined;
8149
- explainFiles?: boolean | undefined;
8150
- listEmittedFiles?: boolean | undefined;
8151
- pretty?: boolean | undefined;
8152
- traceResolution?: boolean | undefined;
8153
- diagnostics?: boolean | undefined;
8154
- extendedDiagnostics?: boolean | undefined;
8155
- generateCpuProfile?: string | undefined;
8156
- generateTrace?: string | undefined;
8157
- incremental?: boolean | undefined;
8158
- declaration?: boolean | undefined;
8159
- declarationMap?: boolean | undefined;
8160
- emitDeclarationOnly?: boolean | undefined;
8161
- sourceMap?: boolean | undefined;
8162
- inlineSourceMap?: boolean | undefined;
8163
- assumeChangesOnlyAffectDirectDependencies?: boolean | undefined;
8164
- locale?: string | undefined;
8165
- target?: "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "esnext" | undefined;
8166
- module?: "preserve" | "es6" | "es2015" | "es2020" | "es2022" | "esnext" | "none" | "commonjs" | "amd" | "system" | "umd" | "node16" | "nodenext" | undefined;
8167
- all?: boolean | undefined;
8168
- version?: boolean | undefined;
8169
- init?: boolean | undefined;
8170
- project?: string | undefined;
8171
- build?: boolean | undefined;
8172
- showConfig?: boolean | undefined;
8173
- listFilesOnly?: boolean | undefined;
8174
- lib?:
8175
- | (
8176
- | "es5"
8177
- | "es6"
8178
- | "es2015"
8179
- | "es2016"
8180
- | "es2017"
8181
- | "es2018"
8182
- | "es2019"
8183
- | "es2020"
8184
- | "es2021"
8185
- | "es2022"
8186
- | "esnext"
8187
- | "es7"
8188
- | "es2023"
8189
- | "dom"
8190
- | "dom.iterable"
8191
- | "dom.asynciterable"
8192
- | "webworker"
8193
- | "webworker.importscripts"
8194
- | "webworker.iterable"
8195
- | "webworker.asynciterable"
8196
- | "scripthost"
8197
- | "es2015.core"
8198
- | "es2015.collection"
8199
- | "es2015.generator"
8200
- | "es2015.iterable"
8201
- | "es2015.promise"
8202
- | "es2015.proxy"
8203
- | "es2015.reflect"
8204
- | "es2015.symbol"
8205
- | "es2015.symbol.wellknown"
8206
- | "es2016.array.include"
8207
- | "es2016.intl"
8208
- | "es2017.date"
8209
- | "es2017.object"
8210
- | "es2017.sharedmemory"
8211
- | "es2017.string"
8212
- | "es2017.intl"
8213
- | "es2017.typedarrays"
8214
- | "es2018.asyncgenerator"
8215
- | "es2018.asynciterable"
8216
- | "es2018.intl"
8217
- | "es2018.promise"
8218
- | "es2018.regexp"
8219
- | "es2019.array"
8220
- | "es2019.object"
8221
- | "es2019.string"
8222
- | "es2019.symbol"
8223
- | "es2019.intl"
8224
- | "es2020.bigint"
8225
- | "es2020.date"
8226
- | "es2020.promise"
8227
- | "es2020.sharedmemory"
8228
- | "es2020.string"
8229
- | "es2020.symbol.wellknown"
8230
- | "es2020.intl"
8231
- | "es2020.number"
8232
- | "es2021.promise"
8233
- | "es2021.string"
8234
- | "es2021.weakref"
8235
- | "es2021.intl"
8236
- | "es2022.array"
8237
- | "es2022.error"
8238
- | "es2022.intl"
8239
- | "es2022.object"
8240
- | "es2022.sharedmemory"
8241
- | "es2022.string"
8242
- | "es2022.regexp"
8243
- | "es2023.array"
8244
- | "es2023.collection"
8245
- | "es2023.intl"
8246
- | "esnext.array"
8247
- | "esnext.collection"
8248
- | "esnext.symbol"
8249
- | "esnext.asynciterable"
8250
- | "esnext.intl"
8251
- | "esnext.disposable"
8252
- | "esnext.bigint"
8253
- | "esnext.string"
8254
- | "esnext.promise"
8255
- | "esnext.weakref"
8256
- | "esnext.decorators"
8257
- | "esnext.object"
8258
- | "esnext.regexp"
8259
- | "decorators"
8260
- | "decorators.legacy"
8261
- )[]
8262
- | undefined;
8263
- allowJs?: boolean | undefined;
8264
- checkJs?: boolean | undefined;
8265
- jsx?: "preserve" | "react-native" | "react" | "react-jsx" | "react-jsxdev" | undefined;
8266
- outFile?: string | undefined;
8267
- outDir?: string | undefined;
8268
- rootDir?: string | undefined;
8269
- composite?: boolean | undefined;
8270
- tsBuildInfoFile?: string | undefined;
8271
- removeComments?: boolean | undefined;
8272
- noEmit?: boolean | undefined;
8273
- importHelpers?: boolean | undefined;
8274
- importsNotUsedAsValues?: "preserve" | "remove" | "error" | undefined;
8275
- downlevelIteration?: boolean | undefined;
8276
- isolatedModules?: boolean | undefined;
8277
- verbatimModuleSyntax?: boolean | undefined;
8278
- strict?: boolean | undefined;
8279
- noImplicitAny?: boolean | undefined;
8280
- strictNullChecks?: boolean | undefined;
8281
- strictFunctionTypes?: boolean | undefined;
8282
- strictBindCallApply?: boolean | undefined;
8283
- strictPropertyInitialization?: boolean | undefined;
8284
- noImplicitThis?: boolean | undefined;
8285
- useUnknownInCatchVariables?: boolean | undefined;
8286
- alwaysStrict?: boolean | undefined;
8287
- noUnusedLocals?: boolean | undefined;
8288
- noUnusedParameters?: boolean | undefined;
8289
- exactOptionalPropertyTypes?: boolean | undefined;
8290
- noImplicitReturns?: boolean | undefined;
8291
- noFallthroughCasesInSwitch?: boolean | undefined;
8292
- noUncheckedIndexedAccess?: boolean | undefined;
8293
- noImplicitOverride?: boolean | undefined;
8294
- noPropertyAccessFromIndexSignature?: boolean | undefined;
8295
- moduleResolution?: "node" | "node16" | "nodenext" | "node10" | "classic" | "bundler" | undefined;
8296
- baseUrl?: string | undefined;
8297
- paths?: Record<string, any> | undefined;
8298
- rootDirs?: string[] | undefined;
8299
- typeRoots?: string[] | undefined;
8300
- types?: string[] | undefined;
8301
- allowSyntheticDefaultImports?: boolean | undefined;
8302
- esModuleInterop?: boolean | undefined;
8303
- preserveSymlinks?: boolean | undefined;
8304
- allowUmdGlobalAccess?: boolean | undefined;
8305
- moduleSuffixes?: string[] | undefined;
8306
- allowImportingTsExtensions?: boolean | undefined;
8307
- resolvePackageJsonExports?: boolean | undefined;
8308
- resolvePackageJsonImports?: boolean | undefined;
8309
- customConditions?: string[] | undefined;
8310
- sourceRoot?: string | undefined;
8311
- mapRoot?: string | undefined;
8312
- inlineSources?: boolean | undefined;
8313
- experimentalDecorators?: boolean | undefined;
8314
- emitDecoratorMetadata?: boolean | undefined;
8315
- jsxFactory?: string | undefined;
8316
- jsxFragmentFactory?: string | undefined;
8317
- jsxImportSource?: string | undefined;
8318
- resolveJsonModule?: boolean | undefined;
8319
- allowArbitraryExtensions?: boolean | undefined;
8320
- out?: string | undefined;
8321
- reactNamespace?: string | undefined;
8322
- skipDefaultLibCheck?: boolean | undefined;
8323
- charset?: string | undefined;
8324
- emitBOM?: boolean | undefined;
8325
- newLine?: "crlf" | "lf" | undefined;
8326
- noErrorTruncation?: boolean | undefined;
8327
- noLib?: boolean | undefined;
8328
- noResolve?: boolean | undefined;
8329
- stripInternal?: boolean | undefined;
8330
- disableSizeLimit?: boolean | undefined;
8331
- disableSourceOfProjectReferenceRedirect?: boolean | undefined;
8332
- disableSolutionSearching?: boolean | undefined;
8333
- disableReferencedProjectLoad?: boolean | undefined;
8334
- noImplicitUseStrict?: boolean | undefined;
8335
- noEmitHelpers?: boolean | undefined;
8336
- noEmitOnError?: boolean | undefined;
8337
- preserveConstEnums?: boolean | undefined;
8338
- declarationDir?: string | undefined;
8339
- skipLibCheck?: boolean | undefined;
8340
- allowUnusedLabels?: boolean | undefined;
8341
- allowUnreachableCode?: boolean | undefined;
8342
- suppressExcessPropertyErrors?: boolean | undefined;
8343
- suppressImplicitAnyIndexErrors?: boolean | undefined;
8344
- forceConsistentCasingInFileNames?: boolean | undefined;
8345
- maxNodeModuleJsDepth?: number | undefined;
8346
- noStrictGenericChecks?: boolean | undefined;
8347
- useDefineForClassFields?: boolean | undefined;
8348
- preserveValueImports?: boolean | undefined;
8349
- keyofStringsOnly?: boolean | undefined;
8350
- plugins?: Record<string, any>[] | undefined;
8351
- moduleDetection?: "auto" | "legacy" | "force" | undefined;
8352
- ignoreDeprecations?: string | undefined;
8353
- } | undefined;
8354
- /**
8355
- * An unprocessed TSConfig object, suitable to read as JSON and transform into command line options
8356
- */
8357
- interface RawTSConfig {
8358
- extends?: string | string[];
8359
- compilerOptions?: NonNullable<typeof _optionsType>;
8360
- references?: {
8361
- path: string;
8362
- }[];
8363
- files?: string[];
8364
- include?: string[];
8365
- exclude?: string[];
8366
- compileOnSave?: boolean;
8367
- }
8368
8144
  interface UserPreferences {
8369
8145
  readonly disableSuggestions?: boolean;
8370
8146
  readonly quotePreference?: "auto" | "double" | "single";