typescript 5.2.0-dev.20230518 → 5.2.0-dev.20230519

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.2";
21
- var version = `${versionMajorMinor}.0-dev.20230518`;
21
+ var version = `${versionMajorMinor}.0-dev.20230519`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7704,6 +7704,7 @@ var Diagnostics = {
7704
7704
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
7705
7705
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
7706
7706
  Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
7707
+ Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"),
7707
7708
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7708
7709
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7709
7710
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
package/lib/tsserver.js CHANGED
@@ -2304,7 +2304,7 @@ module.exports = __toCommonJS(server_exports);
2304
2304
 
2305
2305
  // src/compiler/corePublic.ts
2306
2306
  var versionMajorMinor = "5.2";
2307
- var version = `${versionMajorMinor}.0-dev.20230518`;
2307
+ var version = `${versionMajorMinor}.0-dev.20230519`;
2308
2308
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2309
2309
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2310
2310
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -11212,6 +11212,7 @@ var Diagnostics = {
11212
11212
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
11213
11213
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
11214
11214
  Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
11215
+ Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"),
11215
11216
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
11216
11217
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
11217
11218
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -136494,8 +136495,12 @@ registerRefactor(refactorNameForMoveToFile, {
136494
136495
  Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked");
136495
136496
  const statements = Debug.checkDefined(getStatementsToMove(context));
136496
136497
  Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available");
136497
- const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
136498
- return { edits, renameFilename: void 0, renameLocation: void 0 };
136498
+ const targetFile = interactiveRefactorArguments.targetFile;
136499
+ if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) {
136500
+ const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
136501
+ return { edits, renameFilename: void 0, renameLocation: void 0 };
136502
+ }
136503
+ return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) };
136499
136504
  }
136500
136505
  });
136501
136506
  function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) {
@@ -182117,7 +182122,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
182117
182122
  return {
182118
182123
  renameLocation: mappedRenameLocation,
182119
182124
  renameFilename,
182120
- edits: this.mapTextChangesToCodeEdits(edits)
182125
+ edits: this.mapTextChangesToCodeEdits(edits),
182126
+ notApplicableReason: result.notApplicableReason
182121
182127
  };
182122
182128
  }
182123
182129
  return result;
@@ -619,6 +619,7 @@ declare namespace ts {
619
619
  */
620
620
  renameLocation?: Location;
621
621
  renameFilename?: string;
622
+ notApplicableReason?: string;
622
623
  }
623
624
  /**
624
625
  * Organize imports by:
@@ -10485,6 +10486,7 @@ declare namespace ts {
10485
10486
  renameFilename?: string;
10486
10487
  renameLocation?: number;
10487
10488
  commands?: CodeActionCommand[];
10489
+ notApplicableReason?: string;
10488
10490
  }
10489
10491
  type RefactorTriggerReason = "implicit" | "invoked";
10490
10492
  interface TextInsertion {
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-dev.20230518`;
38
+ version = `${versionMajorMinor}.0-dev.20230519`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9018,6 +9018,7 @@ ${lanes.join("\n")}
9018
9018
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
9019
9019
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
9020
9020
  Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
9021
+ Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"),
9021
9022
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
9022
9023
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
9023
9024
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -135741,8 +135742,12 @@ ${lanes.join("\n")}
135741
135742
  Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked");
135742
135743
  const statements = Debug.checkDefined(getStatementsToMove(context));
135743
135744
  Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available");
135744
- const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
135745
- return { edits, renameFilename: void 0, renameLocation: void 0 };
135745
+ const targetFile = interactiveRefactorArguments.targetFile;
135746
+ if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) {
135747
+ const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
135748
+ return { edits, renameFilename: void 0, renameLocation: void 0 };
135749
+ }
135750
+ return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) };
135746
135751
  }
135747
135752
  });
135748
135753
  }
@@ -179555,7 +179560,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
179555
179560
  return {
179556
179561
  renameLocation: mappedRenameLocation,
179557
179562
  renameFilename,
179558
- edits: this.mapTextChangesToCodeEdits(edits)
179563
+ edits: this.mapTextChangesToCodeEdits(edits),
179564
+ notApplicableReason: result.notApplicableReason
179559
179565
  };
179560
179566
  }
179561
179567
  return result;
@@ -6517,6 +6517,7 @@ declare namespace ts {
6517
6517
  renameFilename?: string;
6518
6518
  renameLocation?: number;
6519
6519
  commands?: CodeActionCommand[];
6520
+ notApplicableReason?: string;
6520
6521
  }
6521
6522
  type RefactorTriggerReason = "implicit" | "invoked";
6522
6523
  interface TextInsertion {
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-dev.20230518`;
38
+ version = `${versionMajorMinor}.0-dev.20230519`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9018,6 +9018,7 @@ ${lanes.join("\n")}
9018
9018
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
9019
9019
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
9020
9020
  Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
9021
+ Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"),
9021
9022
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
9022
9023
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
9023
9024
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -135756,8 +135757,12 @@ ${lanes.join("\n")}
135756
135757
  Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked");
135757
135758
  const statements = Debug.checkDefined(getStatementsToMove(context));
135758
135759
  Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available");
135759
- const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
135760
- return { edits, renameFilename: void 0, renameLocation: void 0 };
135760
+ const targetFile = interactiveRefactorArguments.targetFile;
135761
+ if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) {
135762
+ const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences));
135763
+ return { edits, renameFilename: void 0, renameLocation: void 0 };
135764
+ }
135765
+ return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid) };
135761
135766
  }
135762
135767
  });
135763
135768
  }
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-dev.20230518`;
57
+ var version = `${versionMajorMinor}.0-dev.20230519`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -7078,6 +7078,7 @@ var Diagnostics = {
7078
7078
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
7079
7079
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
7080
7080
  Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
7081
+ Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"),
7081
7082
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7082
7083
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7083
7084
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
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.2.0-dev.20230518",
5
+ "version": "5.2.0-dev.20230519",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "174599c5542c38ee8f1fc61c9ca6532b68cbb19c"
116
+ "gitHead": "ae33099f25a2d575a130f70eac44733a8046cf4e"
117
117
  }