typescript 5.5.0-dev.20240501 → 5.5.0-dev.20240502

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-dev.20240501`;
21
+ var version = `${versionMajorMinor}.0-dev.20240502`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -13534,7 +13534,7 @@ function entityNameToString(name) {
13534
13534
  return Debug.assertNever(name.name);
13535
13535
  }
13536
13536
  case 311 /* JSDocMemberName */:
13537
- return entityNameToString(name.left) + entityNameToString(name.right);
13537
+ return entityNameToString(name.left) + "#" + entityNameToString(name.right);
13538
13538
  case 295 /* JsxNamespacedName */:
13539
13539
  return entityNameToString(name.namespace) + ":" + entityNameToString(name.name);
13540
13540
  default:
@@ -36968,6 +36968,10 @@ var configDirTemplateSubstitutionOptions = optionDeclarations.filter(
36968
36968
  var configDirTemplateSubstitutionWatchOptions = optionsForWatch.filter(
36969
36969
  (option) => option.allowConfigDirTemplateSubstitution || !option.isCommandLineOnly && option.isFilePath
36970
36970
  );
36971
+ var commandLineOptionOfCustomType = optionDeclarations.filter(isCommandLineOptionOfCustomType);
36972
+ function isCommandLineOptionOfCustomType(option) {
36973
+ return !isString(option.type);
36974
+ }
36971
36975
  var optionsForBuild = [
36972
36976
  {
36973
36977
  name: "verbose",
@@ -69003,7 +69007,7 @@ function createTypeChecker(host) {
69003
69007
  if (!hasDefaultClause) {
69004
69008
  return caseType;
69005
69009
  }
69006
- const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, getRegularTypeOfLiteralType(extractUnitType(t)))));
69010
+ const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, t.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(t)))));
69007
69011
  return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);
69008
69012
  }
69009
69013
  function narrowTypeByTypeName(type, typeName) {
@@ -119019,6 +119023,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
119019
119023
  const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
119020
119024
  const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions;
119021
119025
  let { oldProgram } = createProgramOptions;
119026
+ for (const option of commandLineOptionOfCustomType) {
119027
+ if (hasProperty(options, option.name)) {
119028
+ if (typeof options[option.name] === "string") {
119029
+ throw new Error(`${option.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);
119030
+ }
119031
+ }
119032
+ }
119022
119033
  const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations));
119023
119034
  let processingDefaultLibFiles;
119024
119035
  let processingOtherFiles;
package/lib/typescript.js CHANGED
@@ -302,6 +302,7 @@ __export(typescript_exports, {
302
302
  collectExternalModuleInfo: () => collectExternalModuleInfo,
303
303
  combine: () => combine,
304
304
  combinePaths: () => combinePaths,
305
+ commandLineOptionOfCustomType: () => commandLineOptionOfCustomType,
305
306
  commentPragmas: () => commentPragmas,
306
307
  commonOptionsWithBuild: () => commonOptionsWithBuild,
307
308
  commonPackageFolders: () => commonPackageFolders,
@@ -2362,7 +2363,7 @@ module.exports = __toCommonJS(typescript_exports);
2362
2363
 
2363
2364
  // src/compiler/corePublic.ts
2364
2365
  var versionMajorMinor = "5.5";
2365
- var version = `${versionMajorMinor}.0-dev.20240501`;
2366
+ var version = `${versionMajorMinor}.0-dev.20240502`;
2366
2367
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2367
2368
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2368
2369
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -17460,7 +17461,7 @@ function entityNameToString(name) {
17460
17461
  return Debug.assertNever(name.name);
17461
17462
  }
17462
17463
  case 311 /* JSDocMemberName */:
17463
- return entityNameToString(name.left) + entityNameToString(name.right);
17464
+ return entityNameToString(name.left) + "#" + entityNameToString(name.right);
17464
17465
  case 295 /* JsxNamespacedName */:
17465
17466
  return entityNameToString(name.namespace) + ":" + entityNameToString(name.name);
17466
17467
  default:
@@ -41444,6 +41445,10 @@ var configDirTemplateSubstitutionOptions = optionDeclarations.filter(
41444
41445
  var configDirTemplateSubstitutionWatchOptions = optionsForWatch.filter(
41445
41446
  (option) => option.allowConfigDirTemplateSubstitution || !option.isCommandLineOnly && option.isFilePath
41446
41447
  );
41448
+ var commandLineOptionOfCustomType = optionDeclarations.filter(isCommandLineOptionOfCustomType);
41449
+ function isCommandLineOptionOfCustomType(option) {
41450
+ return !isString(option.type);
41451
+ }
41447
41452
  var optionsForBuild = [
41448
41453
  {
41449
41454
  name: "verbose",
@@ -73835,7 +73840,7 @@ function createTypeChecker(host) {
73835
73840
  if (!hasDefaultClause) {
73836
73841
  return caseType;
73837
73842
  }
73838
- const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, getRegularTypeOfLiteralType(extractUnitType(t)))));
73843
+ const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, t.flags & 32768 /* Undefined */ ? undefinedType : getRegularTypeOfLiteralType(extractUnitType(t)))));
73839
73844
  return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]);
73840
73845
  }
73841
73846
  function narrowTypeByTypeName(type, typeName) {
@@ -124095,6 +124100,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
124095
124100
  const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
124096
124101
  const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions;
124097
124102
  let { oldProgram } = createProgramOptions;
124103
+ for (const option of commandLineOptionOfCustomType) {
124104
+ if (hasProperty(options, option.name)) {
124105
+ if (typeof options[option.name] === "string") {
124106
+ throw new Error(`${option.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);
124107
+ }
124108
+ }
124109
+ }
124098
124110
  const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations));
124099
124111
  let processingDefaultLibFiles;
124100
124112
  let processingOtherFiles;
@@ -179080,6 +179092,7 @@ __export(ts_exports2, {
179080
179092
  collectExternalModuleInfo: () => collectExternalModuleInfo,
179081
179093
  combine: () => combine,
179082
179094
  combinePaths: () => combinePaths,
179095
+ commandLineOptionOfCustomType: () => commandLineOptionOfCustomType,
179083
179096
  commentPragmas: () => commentPragmas,
179084
179097
  commonOptionsWithBuild: () => commonOptionsWithBuild,
179085
179098
  commonPackageFolders: () => commonPackageFolders,
@@ -193508,6 +193521,7 @@ if (typeof console !== "undefined") {
193508
193521
  collectExternalModuleInfo,
193509
193522
  combine,
193510
193523
  combinePaths,
193524
+ commandLineOptionOfCustomType,
193511
193525
  commentPragmas,
193512
193526
  commonOptionsWithBuild,
193513
193527
  commonPackageFolders,
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": "5.5.0-dev.20240501",
5
+ "version": "5.5.0-dev.20240502",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -110,5 +110,5 @@
110
110
  "node": "20.1.0",
111
111
  "npm": "8.19.4"
112
112
  },
113
- "gitHead": "33b156147b78486ebebd83ce3de90a635d737bbb"
113
+ "gitHead": "7a38980a7e04bee0e273163f26c91d5c99f28298"
114
114
  }