@typescript-deploys/pr-build 6.0.0-pr-61061-8 → 6.0.0-pr-62661-9

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-insiders.20251007`;
21
+ var version = `${versionMajorMinor}.0-insiders.20251022`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7565,6 +7565,7 @@ var Diagnostics = {
7565
7565
  Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."),
7566
7566
  true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."),
7567
7567
  List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."),
7568
+ false_unless_checkJs_is_set: diag(6932, 3 /* Message */, "false_unless_checkJs_is_set_6932", "`false`, unless `checkJs` is set"),
7568
7569
  Variable_0_implicitly_has_an_1_type: diag(7005, 1 /* Error */, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."),
7569
7570
  Parameter_0_implicitly_has_an_1_type: diag(7006, 1 /* Error */, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."),
7570
7571
  Member_0_implicitly_has_an_1_type: diag(7008, 1 /* Error */, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."),
@@ -14154,7 +14155,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) {
14154
14155
  return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0;
14155
14156
  }
14156
14157
  function getJSDocCommentRanges(node, text) {
14157
- const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ || node.kind === 201 /* MappedType */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
14158
+ const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
14158
14159
  return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range
14159
14160
  text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */);
14160
14161
  }
@@ -15396,7 +15397,6 @@ function canHaveJSDoc(node) {
15396
15397
  case 244 /* VariableStatement */:
15397
15398
  case 248 /* WhileStatement */:
15398
15399
  case 255 /* WithStatement */:
15399
- case 201 /* MappedType */:
15400
15400
  return true;
15401
15401
  default:
15402
15402
  return false;
@@ -31128,7 +31128,6 @@ var Parser;
31128
31128
  }
31129
31129
  function parseMappedType() {
31130
31130
  const pos = getNodePos();
31131
- const hasJSDoc = hasPrecedingJSDocComment();
31132
31131
  parseExpected(19 /* OpenBraceToken */);
31133
31132
  let readonlyToken;
31134
31133
  if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
@@ -31152,10 +31151,7 @@ var Parser;
31152
31151
  parseSemicolon();
31153
31152
  const members = parseList(4 /* TypeMembers */, parseTypeMember);
31154
31153
  parseExpected(20 /* CloseBraceToken */);
31155
- return withJSDoc(
31156
- finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
31157
- hasJSDoc
31158
- );
31154
+ return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
31159
31155
  }
31160
31156
  function parseTupleElementType() {
31161
31157
  const pos = getNodePos();
@@ -33645,7 +33641,11 @@ var Parser;
33645
33641
  case 121 /* LetKeyword */:
33646
33642
  case 87 /* ConstKeyword */:
33647
33643
  case 160 /* UsingKeyword */:
33644
+ return parseVariableStatement(pos, hasJSDoc, modifiersIn);
33648
33645
  case 135 /* AwaitKeyword */:
33646
+ if (!isAwaitUsingDeclaration()) {
33647
+ break;
33648
+ }
33649
33649
  return parseVariableStatement(pos, hasJSDoc, modifiersIn);
33650
33650
  case 100 /* FunctionKeyword */:
33651
33651
  return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
@@ -33674,20 +33674,19 @@ var Parser;
33674
33674
  default:
33675
33675
  return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
33676
33676
  }
33677
- default:
33678
- if (modifiersIn) {
33679
- const missing = createMissingNode(
33680
- 283 /* MissingDeclaration */,
33681
- /*reportAtCurrentPosition*/
33682
- true,
33683
- Diagnostics.Declaration_expected
33684
- );
33685
- setTextRangePos(missing, pos);
33686
- missing.modifiers = modifiersIn;
33687
- return missing;
33688
- }
33689
- return void 0;
33690
33677
  }
33678
+ if (modifiersIn) {
33679
+ const missing = createMissingNode(
33680
+ 283 /* MissingDeclaration */,
33681
+ /*reportAtCurrentPosition*/
33682
+ true,
33683
+ Diagnostics.Declaration_expected
33684
+ );
33685
+ setTextRangePos(missing, pos);
33686
+ missing.modifiers = modifiersIn;
33687
+ return missing;
33688
+ }
33689
+ return void 0;
33691
33690
  }
33692
33691
  function nextTokenIsStringLiteral() {
33693
33692
  return nextToken() === 11 /* StringLiteral */;
@@ -33806,7 +33805,9 @@ var Parser;
33806
33805
  flags |= 4 /* Using */;
33807
33806
  break;
33808
33807
  case 135 /* AwaitKeyword */:
33809
- Debug.assert(isAwaitUsingDeclaration());
33808
+ if (!isAwaitUsingDeclaration()) {
33809
+ break;
33810
+ }
33810
33811
  flags |= 6 /* AwaitUsing */;
33811
33812
  nextToken();
33812
33813
  break;
@@ -34426,7 +34427,7 @@ var Parser;
34426
34427
  }
34427
34428
  function tryParseImportAttributes() {
34428
34429
  const currentToken2 = token();
34429
- if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) {
34430
+ if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) {
34430
34431
  return parseImportAttributes(currentToken2);
34431
34432
  }
34432
34433
  }
@@ -36908,7 +36909,7 @@ var commandOptionsWithoutBuild = [
36908
36909
  showInSimplifiedHelpView: true,
36909
36910
  category: Diagnostics.JavaScript_Support,
36910
36911
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files,
36911
- defaultValueDescription: false
36912
+ defaultValueDescription: Diagnostics.false_unless_checkJs_is_set
36912
36913
  },
36913
36914
  {
36914
36915
  name: "checkJs",
@@ -58488,7 +58489,6 @@ function createTypeChecker(host) {
58488
58489
  const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
58489
58490
  const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
58490
58491
  const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0));
58491
- prop.parent = mappedType.symbol;
58492
58492
  prop.links.mappedType = type;
58493
58493
  prop.links.nameType = propNameType;
58494
58494
  prop.links.keyType = keyType;
@@ -83993,6 +83993,9 @@ function createTypeChecker(host) {
83993
83993
  if (cachedTypes2) return cachedTypes2 === noIterationTypes ? void 0 : cachedTypes2;
83994
83994
  let allIterationTypes;
83995
83995
  for (const constituent of type.types) {
83996
+ if (!!(getReducedType(constituent).flags & 131072 /* Never */)) {
83997
+ continue;
83998
+ }
83996
83999
  const errorOutputContainer = errorNode ? { errors: void 0 } : void 0;
83997
84000
  const iterationTypes2 = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer);
83998
84001
  if (iterationTypes2 === noIterationTypes) {
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "Un nombre de propiedad calculada en un contexto de ambiente debe hacer referencia a una expresión que sea de tipo literal o \"unique symbol\".",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Un nombre de propiedad calculada en una interfaz debe hacer referencia a una expresión que sea de tipo literal o \"unique symbol\".",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Un nombre de propiedad calculada debe ser de tipo \"string\", \"number\", \"symbol\" o \"any\".",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "Las aserciones \"const\" solo pueden aplicarse a las referencias a miembros de enumeración o a literales de cadena, numéricos, booleanos, de matriz o de objeto.",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "Las aserciones \"const\" solo pueden aplicarse a las referencias a miembros de enumeración o a literales de cadena, numéricos, booleanos, de matriz o de objeto.",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Solo se puede acceder a un miembro de enumeración const mediante un literal de cadena.",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Un inicializador \"const\" en un contexto de ambiente debe ser un literal de cadena o numérico o bien una referencia de enumeración de literal.",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Un constructor no puede contener una llamada a \"super\" si su clase extiende \"null\".",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "No se encuentra el módulo \"{0}\". Considere la posibilidad de usar \"--resolveJsonModule\" para importar el módulo con la extensión \".json\".",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "No se encuentra el módulo “{0}”. ¿Pretendía establecer la opción “moduleResolution” en “nodenext” o agregar alias a la opción “paths”?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "No se encuentra el módulo \"{0}\" ni sus declaraciones de tipos correspondientes.",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "No se pueden encontrar declaraciones de módulo o tipo para la importación de efectos secundarios de ''{0}\".",
368
369
  "Cannot_find_name_0_2304": "No se encuentra el nombre '{0}'.",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "No se encuentra el nombre \"{0}\". ¿Quería decir \"{1}\"?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "No se encuentra el nombre '{0}'. ¿Quería decir el miembro de instancia 'this.{0}'?",
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "앰비언트 컨텍스트의 계산된 속성 이름은 형식이 리터럴 형식이거나 'unique symbol' 형식인 식을 참조해야 합니다.",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "인터페이스의 계산된 속성 이름은 형식이 리터럴 형식이거나 'unique symbol' 형식인 식을 참조해야 합니다.",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "계산된 속성 이름은 'string', 'number', 'symbol' 또는 'any' 형식이어야 합니다.",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 어설션은 열거형 멤버나 문자열, 숫자, 부울, 배열 또는 개체 리터럴에 대한 참조에만 적용할 수 있습니다.",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "'const' 어설션은 열거형 멤버나 문자열, 숫자, 부울, 배열 또는 객체 리터럴에 대한 참조에만 적용할 수 있습니다.",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "const 열거형 멤버는 문자열 리터럴을 통해서만 액세스할 수 있습니다.",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "앰비언트 컨텍스트의 'const' 이니셜라이저는 문자열, 숫자 리터럴 또는 리터럴 열거형 참조여야 합니다.",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "생성자는 해당 클래스가 'null'을 확장하는 경우 'super' 호출을 포함할 수 없습니다.",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "'{0}' 모듈을 찾을 수 없습니다. '--resolveJsonModule'을 사용하여 '. json' 확장명이 포함된 모듈을 가져오는 것이 좋습니다.",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "'{0}' 모듈을 찾을 수 없습니다. 'moduleResolution' 옵션을 'nodenext'로 설정하거나 'paths' 옵션에 별칭을 추가하려고 하셨나요?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "'{0}' 모듈 또는 해당 형식 선언을 찾을 수 없습니다.",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "'{0}' 부수 효과 가져오기에 대한 모듈 또는 형식 선언을 찾을 수 없습니다.",
368
369
  "Cannot_find_name_0_2304": "'{0}' 이름을 찾을 수 없습니다.",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "'{0}' 이름을 찾을 수 없습니다. '{1}'을(를) 사용하시겠습니까?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "'{0}' 이름을 찾을 수 없습니다. 인스턴스 멤버 'this.{0}'을(를) 사용하시겠습니까?",
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "Um nome de propriedade computado em um contexto de ambiente deve se referir a uma expressão cujo tipo é um tipo literal ou um 'unique symbol'.",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "Um nome de propriedade computado em uma interface deve se referir a uma expressão cujo tipo é um tipo literal ou um 'unique symbol'.",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "Um nome de propriedade calculado deve ser do tipo 'string', 'number', 'symbol' ou 'any'.",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "As declarações 'const' só podem ser aplicadas a referências a membros de enumeração ou literais de cadeia de caracteres, número, booliano, matriz ou objeto.",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "Uma declaração ''const''pode ser aplicada a referências a membros de enumeração ou literais de cadeia de caracteres, número, booliano, matriz ou objeto.",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "Um membro const enum só pode ser acessado usando um literal de cadeia de caracteres.",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "Um inicializador 'const' em um contexto de ambiente deve ser uma cadeia de caracteres ou um literal numérico ou uma referência de enumeração literal.",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "Um construtor não pode conter uma chamada 'super' quando sua classe estende 'null'.",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "Não é possível localizar o módulo '{0}'. Considere usar '--resolveJsonModule' para importar o módulo com a extensão '.json'.",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "Não é possível localizar o módulo '{0}'. Você quis definir a opção 'moduleResolution' como 'nodenext' ou adicionar aliases à opção 'paths'?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "Não é possível localizar o módulo '{0}' ou suas declarações de tipo correspondentes.",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "Não é possível encontrar as declarações de módulo ou tipo para a importação com efeito colateral de ''{0}''.",
368
369
  "Cannot_find_name_0_2304": "Não é possível encontrar o nome '{0}'.",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "Não é possível localizar o nome '{0}'. Você quis dizer '{1}'?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "Não foi possível localizar o nome '{0}'. Você quis dizer o membro de instância 'this.{0}'?",
@@ -4394,8 +4394,7 @@ declare namespace ts {
4394
4394
  | VariableDeclaration
4395
4395
  | VariableStatement
4396
4396
  | WhileStatement
4397
- | WithStatement
4398
- | MappedTypeNode;
4397
+ | WithStatement;
4399
4398
  type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
4400
4399
  type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
4401
4400
  type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -4814,7 +4813,7 @@ declare namespace ts {
4814
4813
  readonly objectType: TypeNode;
4815
4814
  readonly indexType: TypeNode;
4816
4815
  }
4817
- interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer, JSDocContainer {
4816
+ interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
4818
4817
  readonly kind: SyntaxKind.MappedType;
4819
4818
  readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
4820
4819
  readonly typeParameter: TypeParameterDeclaration;
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-insiders.20251007`;
2289
+ var version = `${versionMajorMinor}.0-insiders.20251022`;
2290
2290
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2291
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2292
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10952,6 +10952,7 @@ var Diagnostics = {
10952
10952
  Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."),
10953
10953
  true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."),
10954
10954
  List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."),
10955
+ false_unless_checkJs_is_set: diag(6932, 3 /* Message */, "false_unless_checkJs_is_set_6932", "`false`, unless `checkJs` is set"),
10955
10956
  Variable_0_implicitly_has_an_1_type: diag(7005, 1 /* Error */, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."),
10956
10957
  Parameter_0_implicitly_has_an_1_type: diag(7006, 1 /* Error */, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."),
10957
10958
  Member_0_implicitly_has_an_1_type: diag(7008, 1 /* Error */, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."),
@@ -17842,7 +17843,7 @@ function getLeadingCommentRangesOfNode(node, sourceFileOfNode) {
17842
17843
  return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0;
17843
17844
  }
17844
17845
  function getJSDocCommentRanges(node, text) {
17845
- const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ || node.kind === 201 /* MappedType */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
17846
+ const commentRanges = node.kind === 170 /* Parameter */ || node.kind === 169 /* TypeParameter */ || node.kind === 219 /* FunctionExpression */ || node.kind === 220 /* ArrowFunction */ || node.kind === 218 /* ParenthesizedExpression */ || node.kind === 261 /* VariableDeclaration */ || node.kind === 282 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos);
17846
17847
  return filter(commentRanges, (comment) => comment.end <= node.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range
17847
17848
  text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */);
17848
17849
  }
@@ -19123,7 +19124,6 @@ function canHaveJSDoc(node) {
19123
19124
  case 244 /* VariableStatement */:
19124
19125
  case 248 /* WhileStatement */:
19125
19126
  case 255 /* WithStatement */:
19126
- case 201 /* MappedType */:
19127
19127
  return true;
19128
19128
  default:
19129
19129
  return false;
@@ -35384,7 +35384,6 @@ var Parser;
35384
35384
  }
35385
35385
  function parseMappedType() {
35386
35386
  const pos = getNodePos();
35387
- const hasJSDoc = hasPrecedingJSDocComment();
35388
35387
  parseExpected(19 /* OpenBraceToken */);
35389
35388
  let readonlyToken;
35390
35389
  if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) {
@@ -35408,10 +35407,7 @@ var Parser;
35408
35407
  parseSemicolon();
35409
35408
  const members = parseList(4 /* TypeMembers */, parseTypeMember);
35410
35409
  parseExpected(20 /* CloseBraceToken */);
35411
- return withJSDoc(
35412
- finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos),
35413
- hasJSDoc
35414
- );
35410
+ return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
35415
35411
  }
35416
35412
  function parseTupleElementType() {
35417
35413
  const pos = getNodePos();
@@ -37901,7 +37897,11 @@ var Parser;
37901
37897
  case 121 /* LetKeyword */:
37902
37898
  case 87 /* ConstKeyword */:
37903
37899
  case 160 /* UsingKeyword */:
37900
+ return parseVariableStatement(pos, hasJSDoc, modifiersIn);
37904
37901
  case 135 /* AwaitKeyword */:
37902
+ if (!isAwaitUsingDeclaration()) {
37903
+ break;
37904
+ }
37905
37905
  return parseVariableStatement(pos, hasJSDoc, modifiersIn);
37906
37906
  case 100 /* FunctionKeyword */:
37907
37907
  return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn);
@@ -37930,20 +37930,19 @@ var Parser;
37930
37930
  default:
37931
37931
  return parseExportDeclaration(pos, hasJSDoc, modifiersIn);
37932
37932
  }
37933
- default:
37934
- if (modifiersIn) {
37935
- const missing = createMissingNode(
37936
- 283 /* MissingDeclaration */,
37937
- /*reportAtCurrentPosition*/
37938
- true,
37939
- Diagnostics.Declaration_expected
37940
- );
37941
- setTextRangePos(missing, pos);
37942
- missing.modifiers = modifiersIn;
37943
- return missing;
37944
- }
37945
- return void 0;
37946
37933
  }
37934
+ if (modifiersIn) {
37935
+ const missing = createMissingNode(
37936
+ 283 /* MissingDeclaration */,
37937
+ /*reportAtCurrentPosition*/
37938
+ true,
37939
+ Diagnostics.Declaration_expected
37940
+ );
37941
+ setTextRangePos(missing, pos);
37942
+ missing.modifiers = modifiersIn;
37943
+ return missing;
37944
+ }
37945
+ return void 0;
37947
37946
  }
37948
37947
  function nextTokenIsStringLiteral() {
37949
37948
  return nextToken() === 11 /* StringLiteral */;
@@ -38062,7 +38061,9 @@ var Parser;
38062
38061
  flags |= 4 /* Using */;
38063
38062
  break;
38064
38063
  case 135 /* AwaitKeyword */:
38065
- Debug.assert(isAwaitUsingDeclaration());
38064
+ if (!isAwaitUsingDeclaration()) {
38065
+ break;
38066
+ }
38066
38067
  flags |= 6 /* AwaitUsing */;
38067
38068
  nextToken();
38068
38069
  break;
@@ -38682,7 +38683,7 @@ var Parser;
38682
38683
  }
38683
38684
  function tryParseImportAttributes() {
38684
38685
  const currentToken2 = token();
38685
- if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) {
38686
+ if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) {
38686
38687
  return parseImportAttributes(currentToken2);
38687
38688
  }
38688
38689
  }
@@ -41164,7 +41165,7 @@ var commandOptionsWithoutBuild = [
41164
41165
  showInSimplifiedHelpView: true,
41165
41166
  category: Diagnostics.JavaScript_Support,
41166
41167
  description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files,
41167
- defaultValueDescription: false
41168
+ defaultValueDescription: Diagnostics.false_unless_checkJs_is_set
41168
41169
  },
41169
41170
  {
41170
41171
  name: "checkJs",
@@ -63094,7 +63095,6 @@ function createTypeChecker(host) {
63094
63095
  const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */;
63095
63096
  const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0;
63096
63097
  const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0));
63097
- prop.parent = mappedType.symbol;
63098
63098
  prop.links.mappedType = type;
63099
63099
  prop.links.nameType = propNameType;
63100
63100
  prop.links.keyType = keyType;
@@ -88599,6 +88599,9 @@ function createTypeChecker(host) {
88599
88599
  if (cachedTypes2) return cachedTypes2 === noIterationTypes ? void 0 : cachedTypes2;
88600
88600
  let allIterationTypes;
88601
88601
  for (const constituent of type.types) {
88602
+ if (!!(getReducedType(constituent).flags & 131072 /* Never */)) {
88603
+ continue;
88604
+ }
88602
88605
  const errorOutputContainer = errorNode ? { errors: void 0 } : void 0;
88603
88606
  const iterationTypes2 = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer);
88604
88607
  if (iterationTypes2 === noIterationTypes) {
@@ -145932,8 +145935,8 @@ function addChildrenRecursively(node) {
145932
145935
  addNodeWithRecursiveChild(node, getInteriorModule(node).body);
145933
145936
  break;
145934
145937
  case 278 /* ExportAssignment */: {
145935
- const expression2 = node.expression;
145936
- const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0;
145938
+ const expression2 = skipOuterExpressions(node.expression);
145939
+ const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) || isClassExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0;
145937
145940
  if (child) {
145938
145941
  startNode(node);
145939
145942
  addChildrenRecursively(child);
@@ -152140,12 +152143,9 @@ var SymbolObject = class {
152140
152143
  return this.declarations;
152141
152144
  }
152142
152145
  getDocumentationComment(checker) {
152143
- var _a, _b, _c, _d;
152144
152146
  if (!this.documentationComment) {
152145
152147
  this.documentationComment = emptyArray;
152146
- if (!this.declarations && isTransientSymbol(this) && this.links.checkFlags & 262144 /* Mapped */ && ((_a = this.parent) == null ? void 0 : _a.declarations) && some((_b = this.parent) == null ? void 0 : _b.declarations, (decl) => hasJSDocInheritDocTag(decl))) {
152147
- this.documentationComment = getDocumentationComment((_d = this.parent) == null ? void 0 : _d.declarations.concat(((_c = this.links.syntheticOrigin) == null ? void 0 : _c.declarations) || emptyArray), checker);
152148
- } else if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {
152148
+ if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) {
152149
152149
  const labelDecl = this.links.target.links.tupleLabelDeclaration;
152150
152150
  this.documentationComment = getDocumentationComment([labelDecl], checker);
152151
152151
  } else {
@@ -174826,9 +174826,7 @@ function isExpandoDeclaration(node) {
174826
174826
  return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */;
174827
174827
  }
174828
174828
  function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) {
174829
- var _a, _b;
174830
- const declarations = isTransientSymbol(symbol) && symbol.links.checkFlags & 262144 /* Mapped */ && !((_a = symbol.declarations) == null ? void 0 : _a.length) ? (_b = symbol.links.syntheticOrigin) == null ? void 0 : _b.declarations : symbol.declarations;
174831
- const filteredDeclarations = declarationFilter !== void 0 ? filter(declarations, declarationFilter) : declarations;
174829
+ const filteredDeclarations = declarationFilter !== void 0 ? filter(symbol.declarations, declarationFilter) : symbol.declarations;
174832
174830
  const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition());
174833
174831
  if (signatureDefinition) {
174834
174832
  return signatureDefinition;
@@ -174865,10 +174863,10 @@ function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolutio
174865
174863
  if (!signatureDeclarations) {
174866
174864
  return void 0;
174867
174865
  }
174868
- const declarations2 = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike);
174869
- const declarationsWithBody = declarations2.filter((d) => !!d.body);
174870
- return declarations2.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo(
174871
- last(declarations2),
174866
+ const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike);
174867
+ const declarationsWithBody = declarations.filter((d) => !!d.body);
174868
+ return declarations.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo(
174869
+ last(declarations),
174872
174870
  typeChecker,
174873
174871
  symbol,
174874
174872
  node,
@@ -26,7 +26,7 @@
26
26
  "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165": "環境內容中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。",
27
27
  "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169": "介面中的計算屬性名稱必須參考型別為常值型別或 'unique symbol' 型別的運算式。",
28
28
  "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464": "計算的屬性名稱必須是 'string'、'number'、'symbol' 或 'any' 類型。",
29
- "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355": "'const' 判斷提示只可套用至列舉成員、字串、數字、布林值、陣列或物件常值的參考。",
29
+ "A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_o_1355": "'const' 判斷提示只可套用至列舉成員、字串、數字、布林值、陣列或物件常值的參考。",
30
30
  "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476": "若要存取常數列舉成員,必須透過字串常值。",
31
31
  "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254": "環境內容中的 'const' 初始設定式必須為字串、數字常值或常值列舉參考。",
32
32
  "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005": "當建構函式的類別擴充為 'null' 時,不得包含 'super' 呼叫。",
@@ -365,6 +365,7 @@
365
365
  "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732": "找不到模組 '{0}'。建議使用 '--resolveJsonModule',匯入副檔名為 '.json' 的模組。",
366
366
  "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792": "找不到模組 '{0}'。您是要將 'moduleResolution' 選項設為 'nodenext',或是要將別名新增至 'paths' 選項?",
367
367
  "Cannot_find_module_0_or_its_corresponding_type_declarations_2307": "找不到模組 '{0}' 或其對應的型別宣告。",
368
+ "Cannot_find_module_or_type_declarations_for_side_effect_import_of_0_2882": "找不到 '{0}' 副作用匯入的模組或類型宣告。",
368
369
  "Cannot_find_name_0_2304": "找不到名稱 '{0}'。",
369
370
  "Cannot_find_name_0_Did_you_mean_1_2552": "找不到名稱 '{0}'。您指的是 '{1}' 嗎?",
370
371
  "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663": "找不到名稱 '{0}'。您要找的是此執行個體成員 'this.{0}' 嗎?",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "6.0.0-pr-61061-8",
5
+ "version": "6.0.0-pr-62661-9",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [