typescript 5.0.0-dev.20230120 → 5.0.0-dev.20230122

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.
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.0";
57
- var version = `${versionMajorMinor}.0-dev.20230120`;
57
+ var version = `${versionMajorMinor}.0-dev.20230122`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -843,18 +843,6 @@ function isPatternMatch({ prefix, suffix }, candidate) {
843
843
  function and(f, g) {
844
844
  return (arg) => f(arg) && g(arg);
845
845
  }
846
- function or(...fs2) {
847
- return (...args) => {
848
- let lastResult;
849
- for (const f of fs2) {
850
- lastResult = f(...args);
851
- if (lastResult) {
852
- return lastResult;
853
- }
854
- }
855
- return lastResult;
856
- };
857
- }
858
846
  function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) {
859
847
  unchanged = unchanged || noop;
860
848
  let newIndex = 0;
@@ -5507,7 +5495,6 @@ var Diagnostics = {
5507
5495
  An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1 /* Error */, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
5508
5496
  Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1 /* Error */, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
5509
5497
  Unexpected_token_Did_you_mean_or_gt: diag(1382, 1 /* Error */, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"),
5510
- Only_named_exports_may_use_export_type: diag(1383, 1 /* Error */, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
5511
5498
  Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, 1 /* Error */, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."),
5512
5499
  Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, 1 /* Error */, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."),
5513
5500
  Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, 1 /* Error */, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
@@ -9959,8 +9946,7 @@ function isUnaryExpressionKind(kind) {
9959
9946
  }
9960
9947
  }
9961
9948
  function isLiteralTypeLiteral(node) {
9962
- node = skipPartiallyEmittedExpressions(node);
9963
- switch (skipPartiallyEmittedExpressions(node).kind) {
9949
+ switch (node.kind) {
9964
9950
  case 104 /* NullKeyword */:
9965
9951
  case 110 /* TrueKeyword */:
9966
9952
  case 95 /* FalseKeyword */:
@@ -10905,7 +10891,7 @@ function isSpecialPropertyDeclaration(expr) {
10905
10891
  }
10906
10892
  function setValueDeclaration(symbol, node) {
10907
10893
  const { valueDeclaration } = symbol;
10908
- if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) {
10894
+ if (!valueDeclaration || !(node.flags & 16777216 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 16777216 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) {
10909
10895
  symbol.valueDeclaration = node;
10910
10896
  }
10911
10897
  }
@@ -18043,12 +18029,21 @@ function getJSDocTypeAliasName(fullName) {
18043
18029
  }
18044
18030
  }
18045
18031
  }
18046
- var isTypeNodeOrTypeParameterDeclaration = or(isTypeNode, isTypeParameterDeclaration);
18047
- var isQuestionOrExclamationToken = or(isQuestionToken, isExclamationToken);
18048
- var isIdentifierOrThisTypeNode = or(isIdentifier, isThisTypeNode);
18049
- var isReadonlyKeywordOrPlusOrMinusToken = or(isReadonlyKeyword, isPlusToken, isMinusToken);
18050
- var isQuestionOrPlusOrMinusToken = or(isQuestionToken, isPlusToken, isMinusToken);
18051
- var isModuleName = or(isIdentifier, isStringLiteral);
18032
+ function isQuestionOrExclamationToken(node) {
18033
+ return isQuestionToken(node) || isExclamationToken(node);
18034
+ }
18035
+ function isIdentifierOrThisTypeNode(node) {
18036
+ return isIdentifier(node) || isThisTypeNode(node);
18037
+ }
18038
+ function isReadonlyKeywordOrPlusOrMinusToken(node) {
18039
+ return isReadonlyKeyword(node) || isPlusToken(node) || isMinusToken(node);
18040
+ }
18041
+ function isQuestionOrPlusOrMinusToken(node) {
18042
+ return isQuestionToken(node) || isPlusToken(node) || isMinusToken(node);
18043
+ }
18044
+ function isModuleName(node) {
18045
+ return isIdentifier(node) || isStringLiteral(node);
18046
+ }
18052
18047
  function isExponentiationOperator(kind) {
18053
18048
  return kind === 42 /* AsteriskAsteriskToken */;
18054
18049
  }
@@ -27073,7 +27068,7 @@ var commandOptionsWithoutBuild = [
27073
27068
  paramType: Diagnostics.NEWLINE,
27074
27069
  category: Diagnostics.Emit,
27075
27070
  description: Diagnostics.Set_the_newline_character_for_emitting_files,
27076
- defaultValueDescription: Diagnostics.Platform_specific
27071
+ defaultValueDescription: "lf"
27077
27072
  },
27078
27073
  {
27079
27074
  name: "noErrorTruncation",
@@ -27249,7 +27244,7 @@ var commandOptionsWithoutBuild = [
27249
27244
  affectsModuleResolution: true,
27250
27245
  category: Diagnostics.Interop_Constraints,
27251
27246
  description: Diagnostics.Ensure_that_casing_is_correct_in_imports,
27252
- defaultValueDescription: false
27247
+ defaultValueDescription: true
27253
27248
  },
27254
27249
  {
27255
27250
  name: "maxNodeModuleJsDepth",
@@ -27373,14 +27368,6 @@ var buildOpts = [
27373
27368
  ...optionsForBuild
27374
27369
  ];
27375
27370
  var typeAcquisitionDeclarations = [
27376
- {
27377
- /* @deprecated typingOptions.enableAutoDiscovery
27378
- * Use typeAcquisition.enable instead.
27379
- */
27380
- name: "enableAutoDiscovery",
27381
- type: "boolean",
27382
- defaultValueDescription: false
27383
- },
27384
27371
  {
27385
27372
  name: "enable",
27386
27373
  type: "boolean",
@@ -27562,12 +27549,6 @@ function getTsconfigRootOptionsMap() {
27562
27549
  elementOptions: getCommandLineWatchOptionsMap(),
27563
27550
  extraKeyDiagnostics: watchOptionsDidYouMeanDiagnostics
27564
27551
  },
27565
- {
27566
- name: "typingOptions",
27567
- type: "object",
27568
- elementOptions: getCommandLineTypeAcquisitionMap(),
27569
- extraKeyDiagnostics: typeAcquisitionDidYouMeanDiagnostics
27570
- },
27571
27552
  {
27572
27553
  name: "typeAcquisition",
27573
27554
  type: "object",
@@ -31252,6 +31233,9 @@ function createBinder() {
31252
31233
  function checkContextualIdentifier(node) {
31253
31234
  if (!file.parseDiagnostics.length && !(node.flags & 16777216 /* Ambient */) && !(node.flags & 8388608 /* JSDoc */) && !isIdentifierName(node)) {
31254
31235
  const originalKeywordKind = identifierToKeywordKind(node);
31236
+ if (originalKeywordKind === void 0) {
31237
+ return;
31238
+ }
31255
31239
  if (inStrictMode && originalKeywordKind >= 117 /* FirstFutureReservedWord */ && originalKeywordKind <= 125 /* LastFutureReservedWord */) {
31256
31240
  file.bindDiagnostics.push(createDiagnosticForNode2(
31257
31241
  node,
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.0.0-dev.20230120",
5
+ "version": "5.0.0-dev.20230122",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [