typescript 6.0.0-dev.20251021 → 6.0.0-dev.20251023

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 = "6.0";
21
- var version = `${versionMajorMinor}.0-dev.20251021`;
21
+ var version = `${versionMajorMinor}.0-dev.20251023`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -18037,29 +18037,21 @@ var _computedOptions = createComputedCompilerOptions({
18037
18037
  }
18038
18038
  },
18039
18039
  esModuleInterop: {
18040
- dependencies: ["module", "target"],
18040
+ dependencies: [],
18041
18041
  computeValue: (compilerOptions) => {
18042
18042
  if (compilerOptions.esModuleInterop !== void 0) {
18043
18043
  return compilerOptions.esModuleInterop;
18044
18044
  }
18045
- switch (_computedOptions.module.computeValue(compilerOptions)) {
18046
- case 100 /* Node16 */:
18047
- case 101 /* Node18 */:
18048
- case 102 /* Node20 */:
18049
- case 199 /* NodeNext */:
18050
- case 200 /* Preserve */:
18051
- return true;
18052
- }
18053
- return false;
18045
+ return true;
18054
18046
  }
18055
18047
  },
18056
18048
  allowSyntheticDefaultImports: {
18057
- dependencies: ["module", "target", "moduleResolution"],
18049
+ dependencies: [],
18058
18050
  computeValue: (compilerOptions) => {
18059
18051
  if (compilerOptions.allowSyntheticDefaultImports !== void 0) {
18060
18052
  return compilerOptions.allowSyntheticDefaultImports;
18061
18053
  }
18062
- return _computedOptions.esModuleInterop.computeValue(compilerOptions) || _computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;
18054
+ return true;
18063
18055
  }
18064
18056
  },
18065
18057
  resolvePackageJsonExports: {
@@ -33641,7 +33633,11 @@ var Parser;
33641
33633
  case 121 /* LetKeyword */:
33642
33634
  case 87 /* ConstKeyword */:
33643
33635
  case 160 /* UsingKeyword */:
33636
+ return parseVariableStatement(pos, hasJSDoc, modifiersIn);
33644
33637
  case 135 /* AwaitKeyword */:
33638
+ if (!isAwaitUsingDeclaration()) {
33639
+ break;
33640
+ }
33645
33641
  return parseVariableStatement(pos, hasJSDoc, modifiersIn);
33646
33642
  case 100 /* FunctionKeyword */:
33647
33643
  return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
@@ -33670,20 +33666,19 @@ var Parser;
33670
33666
  default:
33671
33667
  return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
33672
33668
  }
33673
- default:
33674
- if (modifiersIn) {
33675
- const missing = createMissingNode(
33676
- 283 /* MissingDeclaration */,
33677
- /*reportAtCurrentPosition*/
33678
- true,
33679
- Diagnostics.Declaration_expected
33680
- );
33681
- setTextRangePos(missing, pos);
33682
- missing.modifiers = modifiersIn;
33683
- return missing;
33684
- }
33685
- return void 0;
33686
33669
  }
33670
+ if (modifiersIn) {
33671
+ const missing = createMissingNode(
33672
+ 283 /* MissingDeclaration */,
33673
+ /*reportAtCurrentPosition*/
33674
+ true,
33675
+ Diagnostics.Declaration_expected
33676
+ );
33677
+ setTextRangePos(missing, pos);
33678
+ missing.modifiers = modifiersIn;
33679
+ return missing;
33680
+ }
33681
+ return void 0;
33687
33682
  }
33688
33683
  function nextTokenIsStringLiteral() {
33689
33684
  return nextToken() === 11 /* StringLiteral */;
@@ -33802,7 +33797,9 @@ var Parser;
33802
33797
  flags |= 4 /* Using */;
33803
33798
  break;
33804
33799
  case 135 /* AwaitKeyword */:
33805
- Debug.assert(isAwaitUsingDeclaration());
33800
+ if (!isAwaitUsingDeclaration()) {
33801
+ break;
33802
+ }
33806
33803
  flags |= 6 /* AwaitUsing */;
33807
33804
  nextToken();
33808
33805
  break;
@@ -37352,7 +37349,7 @@ var commandOptionsWithoutBuild = [
37352
37349
  affectsBuildInfo: true,
37353
37350
  category: Diagnostics.Interop_Constraints,
37354
37351
  description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
37355
- defaultValueDescription: Diagnostics.module_system_or_esModuleInterop
37352
+ defaultValueDescription: true
37356
37353
  },
37357
37354
  {
37358
37355
  name: "esModuleInterop",
@@ -37363,7 +37360,7 @@ var commandOptionsWithoutBuild = [
37363
37360
  showInSimplifiedHelpView: true,
37364
37361
  category: Diagnostics.Interop_Constraints,
37365
37362
  description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
37366
- defaultValueDescription: false
37363
+ defaultValueDescription: true
37367
37364
  },
37368
37365
  {
37369
37366
  name: "preserveSymlinks",
@@ -74396,7 +74393,7 @@ function createTypeChecker(host) {
74396
74393
  }
74397
74394
  function checkSpreadPropOverrides(type, props, spread) {
74398
74395
  for (const right of getPropertiesOfType(type)) {
74399
- if (!(right.flags & 16777216 /* Optional */)) {
74396
+ if (!(right.flags & 16777216 /* Optional */) && !(getCheckFlags(right) & 48 /* Partial */)) {
74400
74397
  const left = props.get(right.escapedName);
74401
74398
  if (left) {
74402
74399
  const diagnostic = error(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName));
@@ -124719,6 +124716,26 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
124719
124716
  Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
124720
124717
  );
124721
124718
  }
124719
+ if (options.esModuleInterop === false) {
124720
+ createDeprecatedDiagnostic(
124721
+ "esModuleInterop",
124722
+ "false",
124723
+ /*useInstead*/
124724
+ void 0,
124725
+ /*related*/
124726
+ void 0
124727
+ );
124728
+ }
124729
+ if (options.allowSyntheticDefaultImports === false) {
124730
+ createDeprecatedDiagnostic(
124731
+ "allowSyntheticDefaultImports",
124732
+ "false",
124733
+ /*useInstead*/
124734
+ void 0,
124735
+ /*related*/
124736
+ void 0
124737
+ );
124738
+ }
124722
124739
  });
124723
124740
  }
124724
124741
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
package/lib/typescript.js CHANGED
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(typescript_exports);
2286
2286
 
2287
2287
  // src/compiler/corePublic.ts
2288
2288
  var versionMajorMinor = "6.0";
2289
- var version = `${versionMajorMinor}.0-dev.20251021`;
2289
+ var version = `${versionMajorMinor}.0-dev.20251023`;
2290
2290
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2291
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2292
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -21990,29 +21990,21 @@ var _computedOptions = createComputedCompilerOptions({
21990
21990
  }
21991
21991
  },
21992
21992
  esModuleInterop: {
21993
- dependencies: ["module", "target"],
21993
+ dependencies: [],
21994
21994
  computeValue: (compilerOptions) => {
21995
21995
  if (compilerOptions.esModuleInterop !== void 0) {
21996
21996
  return compilerOptions.esModuleInterop;
21997
21997
  }
21998
- switch (_computedOptions.module.computeValue(compilerOptions)) {
21999
- case 100 /* Node16 */:
22000
- case 101 /* Node18 */:
22001
- case 102 /* Node20 */:
22002
- case 199 /* NodeNext */:
22003
- case 200 /* Preserve */:
22004
- return true;
22005
- }
22006
- return false;
21998
+ return true;
22007
21999
  }
22008
22000
  },
22009
22001
  allowSyntheticDefaultImports: {
22010
- dependencies: ["module", "target", "moduleResolution"],
22002
+ dependencies: [],
22011
22003
  computeValue: (compilerOptions) => {
22012
22004
  if (compilerOptions.allowSyntheticDefaultImports !== void 0) {
22013
22005
  return compilerOptions.allowSyntheticDefaultImports;
22014
22006
  }
22015
- return _computedOptions.esModuleInterop.computeValue(compilerOptions) || _computedOptions.module.computeValue(compilerOptions) === 4 /* System */ || _computedOptions.moduleResolution.computeValue(compilerOptions) === 100 /* Bundler */;
22007
+ return true;
22016
22008
  }
22017
22009
  },
22018
22010
  resolvePackageJsonExports: {
@@ -37897,7 +37889,11 @@ var Parser;
37897
37889
  case 121 /* LetKeyword */:
37898
37890
  case 87 /* ConstKeyword */:
37899
37891
  case 160 /* UsingKeyword */:
37892
+ return parseVariableStatement(pos, hasJSDoc, modifiersIn);
37900
37893
  case 135 /* AwaitKeyword */:
37894
+ if (!isAwaitUsingDeclaration()) {
37895
+ break;
37896
+ }
37901
37897
  return parseVariableStatement(pos, hasJSDoc, modifiersIn);
37902
37898
  case 100 /* FunctionKeyword */:
37903
37899
  return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
@@ -37926,20 +37922,19 @@ var Parser;
37926
37922
  default:
37927
37923
  return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
37928
37924
  }
37929
- default:
37930
- if (modifiersIn) {
37931
- const missing = createMissingNode(
37932
- 283 /* MissingDeclaration */,
37933
- /*reportAtCurrentPosition*/
37934
- true,
37935
- Diagnostics.Declaration_expected
37936
- );
37937
- setTextRangePos(missing, pos);
37938
- missing.modifiers = modifiersIn;
37939
- return missing;
37940
- }
37941
- return void 0;
37942
37925
  }
37926
+ if (modifiersIn) {
37927
+ const missing = createMissingNode(
37928
+ 283 /* MissingDeclaration */,
37929
+ /*reportAtCurrentPosition*/
37930
+ true,
37931
+ Diagnostics.Declaration_expected
37932
+ );
37933
+ setTextRangePos(missing, pos);
37934
+ missing.modifiers = modifiersIn;
37935
+ return missing;
37936
+ }
37937
+ return void 0;
37943
37938
  }
37944
37939
  function nextTokenIsStringLiteral() {
37945
37940
  return nextToken() === 11 /* StringLiteral */;
@@ -38058,7 +38053,9 @@ var Parser;
38058
38053
  flags |= 4 /* Using */;
38059
38054
  break;
38060
38055
  case 135 /* AwaitKeyword */:
38061
- Debug.assert(isAwaitUsingDeclaration());
38056
+ if (!isAwaitUsingDeclaration()) {
38057
+ break;
38058
+ }
38062
38059
  flags |= 6 /* AwaitUsing */;
38063
38060
  nextToken();
38064
38061
  break;
@@ -41608,7 +41605,7 @@ var commandOptionsWithoutBuild = [
41608
41605
  affectsBuildInfo: true,
41609
41606
  category: Diagnostics.Interop_Constraints,
41610
41607
  description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
41611
- defaultValueDescription: Diagnostics.module_system_or_esModuleInterop
41608
+ defaultValueDescription: true
41612
41609
  },
41613
41610
  {
41614
41611
  name: "esModuleInterop",
@@ -41619,7 +41616,7 @@ var commandOptionsWithoutBuild = [
41619
41616
  showInSimplifiedHelpView: true,
41620
41617
  category: Diagnostics.Interop_Constraints,
41621
41618
  description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
41622
- defaultValueDescription: false
41619
+ defaultValueDescription: true
41623
41620
  },
41624
41621
  {
41625
41622
  name: "preserveSymlinks",
@@ -79002,7 +78999,7 @@ function createTypeChecker(host) {
79002
78999
  }
79003
79000
  function checkSpreadPropOverrides(type, props, spread) {
79004
79001
  for (const right of getPropertiesOfType(type)) {
79005
- if (!(right.flags & 16777216 /* Optional */)) {
79002
+ if (!(right.flags & 16777216 /* Optional */) && !(getCheckFlags(right) & 48 /* Partial */)) {
79006
79003
  const left = props.get(right.escapedName);
79007
79004
  if (left) {
79008
79005
  const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName));
@@ -129564,6 +129561,26 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129564
129561
  Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
129565
129562
  );
129566
129563
  }
129564
+ if (options.esModuleInterop === false) {
129565
+ createDeprecatedDiagnostic(
129566
+ "esModuleInterop",
129567
+ "false",
129568
+ /*useInstead*/
129569
+ void 0,
129570
+ /*related*/
129571
+ void 0
129572
+ );
129573
+ }
129574
+ if (options.allowSyntheticDefaultImports === false) {
129575
+ createDeprecatedDiagnostic(
129576
+ "allowSyntheticDefaultImports",
129577
+ "false",
129578
+ /*useInstead*/
129579
+ void 0,
129580
+ /*related*/
129581
+ void 0
129582
+ );
129583
+ }
129567
129584
  });
129568
129585
  }
129569
129586
  function verifyDeprecatedProjectReference(ref, parentFile, index) {
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": "6.0.0-dev.20251021",
5
+ "version": "6.0.0-dev.20251023",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "af3a3779de6bc27619c85077e1b4d1de8feddd35"
118
+ "gitHead": "f450c1b80ce6dc7b04e81899db00534018932234"
119
119
  }