typescript 4.4.0-dev.20210806 → 4.4.2

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.
@@ -519,7 +519,7 @@
519
519
  "Disable_checking_for_this_file_90018": "이 파일 확인을 사용하지 않도록 설정",
520
520
  "Disable_emitting_comments_6688": "주석 내보내기 사용 안 함",
521
521
  "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701": "JSDoc 주석에 '@internal'이 있는 선언을 내보내지 않도록 설정합니다.",
522
- "Disable_emitting_file_from_a_compilation_6660": "컴파일에서 파일을 내보내지 않도록 설정합니다.",
522
+ "Disable_emitting_files_from_a_compilation_6660": "Disable emitting files from a compilation.",
523
523
  "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662": "형식 검사 오류가 보고되면 파일을 내보내지 않도록 설정합니다.",
524
524
  "Disable_erasing_const_enum_declarations_in_generated_code_6682": "생성된 코드에서 'const enum' 선언 지우기 사용 안 함",
525
525
  "Disable_error_reporting_for_unreachable_code_6603": "연결할 수 없는 코드에 대한 오류 보고를 사용하지 않습니다.",
@@ -589,7 +589,7 @@
589
589
  "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621": "반복을 위해 규격에 더 맞지만 장황하고 성능이 떨어지는 JavaScript를 내보냅니다.",
590
590
  "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152": "단일 파일 내에서 소스 맵과 함께 소스를 내보냅니다. '--inlineSourceMap' 또는 '--sourceMap'을 설정해야 합니다.",
591
591
  "Enable_all_strict_type_checking_options_6180": "엄격한 형식 검사 옵션을 모두 사용하도록 설정합니다.",
592
- "Enable_color_and_formatting_in_output_to_make_compiler_errors_easier_to_read_6685": "컴파일러 오류를 더 쉽게 읽을 수 있도록 출력에서 색상 및 서식을 사용합니다.",
592
+ "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685": "Enable color and formatting in TypeScript's output to make compiler errors easier to read",
593
593
  "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611": "TypeScript 프로젝트를 프로젝트 참조와 함께 사용할 수 있는 제약 조건을 사용합니다.",
594
594
  "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667": "함수에서 명시적으로 반환되지 않은 코드 경로에 대한 오류 보고를 사용합니다.",
595
595
  "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665": "암시된 'any' 형식이 있는 식 및 선언에 대해 보고하는 오류를 사용 설정합니다.",
package/lib/lib.dom.d.ts CHANGED
@@ -6400,6 +6400,12 @@ interface HTMLDocument extends Document {
6400
6400
  removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
6401
6401
  }
6402
6402
 
6403
+ /** @deprecated */
6404
+ declare var HTMLDocument: {
6405
+ prototype: HTMLDocument;
6406
+ new(): HTMLDocument;
6407
+ };
6408
+
6403
6409
  interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
6404
6410
  }
6405
6411
 
@@ -17201,7 +17207,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
17201
17207
 
17202
17208
  /** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
17203
17209
  interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
17204
- HTMLDocument: Document;
17205
17210
  /** @deprecated This is a legacy alias of `navigator`. */
17206
17211
  readonly clientInformation: Navigator;
17207
17212
  /**
@@ -18266,7 +18271,6 @@ declare var Image: {
18266
18271
  declare var Option: {
18267
18272
  new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
18268
18273
  };
18269
- declare var HTMLDocument: Document;
18270
18274
  /** @deprecated This is a legacy alias of `navigator`. */
18271
18275
  declare var clientInformation: Navigator;
18272
18276
  /**
package/lib/protocol.d.ts CHANGED
@@ -1954,11 +1954,7 @@ declare namespace ts.server.protocol {
1954
1954
  interface SignatureHelpResponse extends Response {
1955
1955
  body?: SignatureHelpItems;
1956
1956
  }
1957
- const enum InlayHintKind {
1958
- Type = "Type",
1959
- Parameter = "Parameter",
1960
- Enum = "Enum"
1961
- }
1957
+ type InlayHintKind = "Type" | "Parameter" | "Enum";
1962
1958
  interface InlayHintsRequestArgs extends FileRequestArgs {
1963
1959
  /**
1964
1960
  * Start position of the span.
@@ -1976,7 +1972,7 @@ declare namespace ts.server.protocol {
1976
1972
  interface InlayHintItem {
1977
1973
  text: string;
1978
1974
  position: Location;
1979
- kind?: InlayHintKind;
1975
+ kind: InlayHintKind;
1980
1976
  whitespaceBefore?: boolean;
1981
1977
  whitespaceAfter?: boolean;
1982
1978
  }
package/lib/tsc.js CHANGED
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.4";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20210806";
72
+ ts.version = "4.4.2";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -5220,7 +5220,7 @@ var ts;
5220
5220
  Decorators_are_not_valid_here: diag(1206, ts.DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
5221
5221
  Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, ts.DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."),
5222
5222
  _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, ts.DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),
5223
- Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: diag(1210, ts.DiagnosticCategory.Error, "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", "Invalid use of '{0}'. Class definitions are automatically in strict mode."),
5223
+ Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, ts.DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),
5224
5224
  A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, ts.DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."),
5225
5225
  Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."),
5226
5226
  Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),
@@ -6822,6 +6822,8 @@ var ts;
6822
6822
  Can_only_convert_named_export: diag(95164, ts.DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"),
6823
6823
  Add_missing_properties: diag(95165, ts.DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"),
6824
6824
  Add_all_missing_properties: diag(95166, ts.DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"),
6825
+ Add_missing_attributes: diag(95167, ts.DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"),
6826
+ Add_all_missing_attributes: diag(95168, ts.DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"),
6825
6827
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.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."),
6826
6828
  Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
6827
6829
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.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?"),
@@ -16437,6 +16439,10 @@ var ts;
16437
16439
  return false;
16438
16440
  }
16439
16441
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
16442
+ function isInfinityOrNaNString(name) {
16443
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
16444
+ }
16445
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
16440
16446
  })(ts || (ts = {}));
16441
16447
  var ts;
16442
16448
  (function (ts) {
@@ -21920,7 +21926,7 @@ var ts;
21920
21926
  name: "typescript:spreadArray",
21921
21927
  importName: "__spreadArray",
21922
21928
  scoped: false,
21923
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
21929
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
21924
21930
  };
21925
21931
  ts.valuesHelper = {
21926
21932
  name: "typescript:values",
@@ -36207,7 +36213,7 @@ var ts;
36207
36213
  }
36208
36214
  function getStrictModeEvalOrArgumentsMessage(node) {
36209
36215
  if (ts.getContainingClass(node)) {
36210
- return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;
36216
+ return ts.Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;
36211
36217
  }
36212
36218
  if (file.externalModuleIndicator) {
36213
36219
  return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;
@@ -58341,9 +58347,6 @@ var ts;
58341
58347
  function isNumericComputedName(name) {
58342
58348
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296);
58343
58349
  }
58344
- function isInfinityOrNaNString(name) {
58345
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
58346
- }
58347
58350
  function isNumericLiteralName(name) {
58348
58351
  return (+name).toString() === name;
58349
58352
  }
@@ -67111,8 +67114,8 @@ var ts;
67111
67114
  error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
67112
67115
  error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
67113
67116
  }
67114
- else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.valueDeclaration) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
67115
- var baseHasAbstract = ts.hasAbstractModifier(baseProp.valueDeclaration);
67117
+ else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
67118
+ var baseHasAbstract = ts.some(baseProp.declarations, function (d) { return ts.hasAbstractModifier(d); });
67116
67119
  if (hasOverride) {
67117
67120
  return;
67118
67121
  }
@@ -67451,7 +67454,7 @@ var ts;
67451
67454
  }
67452
67455
  else {
67453
67456
  var text = ts.getTextOfPropertyName(member.name);
67454
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
67457
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
67455
67458
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
67456
67459
  }
67457
67460
  }
@@ -67544,7 +67547,7 @@ var ts;
67544
67547
  return evaluate(expr.expression);
67545
67548
  case 79:
67546
67549
  var identifier = expr;
67547
- if (isInfinityOrNaNString(identifier.escapedText)) {
67550
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
67548
67551
  return +(identifier.escapedText);
67549
67552
  }
67550
67553
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
package/lib/tsserver.js CHANGED
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
22
22
  ar[i] = from[i];
23
23
  }
24
24
  }
25
- return to.concat(ar || from);
25
+ return to.concat(ar || Array.prototype.slice.call(from));
26
26
  };
27
27
  var __assign = (this && this.__assign) || function () {
28
28
  __assign = Object.assign || function(t) {
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20210806";
103
+ ts.version = "4.4.2";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -7976,7 +7976,7 @@ var ts;
7976
7976
  Decorators_are_not_valid_here: diag(1206, ts.DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
7977
7977
  Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, ts.DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."),
7978
7978
  _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, ts.DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),
7979
- Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: diag(1210, ts.DiagnosticCategory.Error, "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", "Invalid use of '{0}'. Class definitions are automatically in strict mode."),
7979
+ Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, ts.DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),
7980
7980
  A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, ts.DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."),
7981
7981
  Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."),
7982
7982
  Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),
@@ -9578,6 +9578,8 @@ var ts;
9578
9578
  Can_only_convert_named_export: diag(95164, ts.DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"),
9579
9579
  Add_missing_properties: diag(95165, ts.DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"),
9580
9580
  Add_all_missing_properties: diag(95166, ts.DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"),
9581
+ Add_missing_attributes: diag(95167, ts.DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"),
9582
+ Add_all_missing_attributes: diag(95168, ts.DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"),
9581
9583
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.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."),
9582
9584
  Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
9583
9585
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.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?"),
@@ -20669,6 +20671,11 @@ var ts;
20669
20671
  return false;
20670
20672
  }
20671
20673
  ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
20674
+ /* @internal */
20675
+ function isInfinityOrNaNString(name) {
20676
+ return name === "Infinity" || name === "-Infinity" || name === "NaN";
20677
+ }
20678
+ ts.isInfinityOrNaNString = isInfinityOrNaNString;
20672
20679
  })(ts || (ts = {}));
20673
20680
  /* @internal */
20674
20681
  var ts;
@@ -27226,7 +27233,7 @@ var ts;
27226
27233
  name: "typescript:spreadArray",
27227
27234
  importName: "__spreadArray",
27228
27235
  scoped: false,
27229
- text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n };"
27236
+ text: "\n var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n };"
27230
27237
  };
27231
27238
  // ES2015 Destructuring Helpers
27232
27239
  ts.valuesHelper = {
@@ -44272,7 +44279,7 @@ var ts;
44272
44279
  // Provide specialized messages to help the user understand why we think they're in
44273
44280
  // strict mode.
44274
44281
  if (ts.getContainingClass(node)) {
44275
- return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;
44282
+ return ts.Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;
44276
44283
  }
44277
44284
  if (file.externalModuleIndicator) {
44278
44285
  return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;
@@ -69866,9 +69873,6 @@ var ts;
69866
69873
  // but this behavior is consistent with checkIndexedAccess
69867
69874
  return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */);
69868
69875
  }
69869
- function isInfinityOrNaNString(name) {
69870
- return name === "Infinity" || name === "-Infinity" || name === "NaN";
69871
- }
69872
69876
  function isNumericLiteralName(name) {
69873
69877
  // The intent of numeric names is that
69874
69878
  // - they are names with text in a numeric form, and that
@@ -80160,8 +80164,8 @@ var ts;
80160
80164
  error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
80161
80165
  error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
80162
80166
  }
80163
- else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.valueDeclaration) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
80164
- var baseHasAbstract = ts.hasAbstractModifier(baseProp.valueDeclaration);
80167
+ else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
80168
+ var baseHasAbstract = ts.some(baseProp.declarations, function (d) { return ts.hasAbstractModifier(d); });
80165
80169
  if (hasOverride) {
80166
80170
  return;
80167
80171
  }
@@ -80541,7 +80545,7 @@ var ts;
80541
80545
  }
80542
80546
  else {
80543
80547
  var text = ts.getTextOfPropertyName(member.name);
80544
- if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
80548
+ if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
80545
80549
  error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
80546
80550
  }
80547
80551
  }
@@ -80641,7 +80645,7 @@ var ts;
80641
80645
  return evaluate(expr.expression);
80642
80646
  case 79 /* Identifier */:
80643
80647
  var identifier = expr;
80644
- if (isInfinityOrNaNString(identifier.escapedText)) {
80648
+ if (ts.isInfinityOrNaNString(identifier.escapedText)) {
80645
80649
  return +(identifier.escapedText);
80646
80650
  }
80647
80651
  return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
@@ -121147,7 +121151,7 @@ var ts;
121147
121151
  if (ts.isClassDeclaration(node)) {
121148
121152
  // for class and function declarations, use the `default` modifier
121149
121153
  // when the declaration is unnamed.
121150
- var defaultModifier = ts.find(node.modifiers, isDefaultModifier);
121154
+ var defaultModifier = node.modifiers && ts.find(node.modifiers, isDefaultModifier);
121151
121155
  if (defaultModifier)
121152
121156
  return defaultModifier;
121153
121157
  }
@@ -124905,7 +124909,7 @@ var ts;
124905
124909
  if (ts.isJsxExpression(node)) {
124906
124910
  inJSXElement = false;
124907
124911
  }
124908
- if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) {
124912
+ if (ts.isIdentifier(node) && !inJSXElement && !inImportClause(node) && !ts.isInfinityOrNaNString(node.escapedText)) {
124909
124913
  var symbol = typeChecker.getSymbolAtLocation(node);
124910
124914
  if (symbol) {
124911
124915
  if (symbol.flags & 2097152 /* Alias */) {
@@ -125037,9 +125041,6 @@ var ts;
125037
125041
  function isRightSideOfQualifiedNameOrPropertyAccess(node) {
125038
125042
  return (ts.isQualifiedName(node.parent) && node.parent.right === node) || (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node);
125039
125043
  }
125040
- function isInfinityOrNaNString(name) {
125041
- return name === "Infinity" || name === "NaN";
125042
- }
125043
125044
  var tokenFromDeclarationMapping = new ts.Map([
125044
125045
  [252 /* VariableDeclaration */, 7 /* variable */],
125045
125046
  [162 /* Parameter */, 6 /* parameter */],
@@ -137102,7 +137103,7 @@ var ts;
137102
137103
  for (var i = 0; i < args.length; ++i) {
137103
137104
  var originalArg = args[i];
137104
137105
  var arg = ts.skipParentheses(originalArg);
137105
- if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableExpression(arg)) {
137106
+ if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
137106
137107
  continue;
137107
137108
  }
137108
137109
  var identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, i);
@@ -137140,8 +137141,22 @@ var ts;
137140
137141
  var regex = leadingParameterNameCommentRegexFactory(name);
137141
137142
  return ts.some(ranges, function (range) { return regex.test(sourceFileText.substring(range.pos, range.end)); });
137142
137143
  }
137143
- function isHintableExpression(node) {
137144
- return ts.isLiteralExpression(node) || ts.isBooleanLiteral(node) || ts.isArrowFunction(node) || ts.isFunctionExpression(node) || ts.isObjectLiteralExpression(node) || ts.isArrayLiteralExpression(node);
137144
+ function isHintableLiteral(node) {
137145
+ switch (node.kind) {
137146
+ case 217 /* PrefixUnaryExpression */: {
137147
+ var operand = node.operand;
137148
+ return ts.isLiteralExpression(operand) || ts.isIdentifier(operand) && ts.isInfinityOrNaNString(operand.escapedText);
137149
+ }
137150
+ case 110 /* TrueKeyword */:
137151
+ case 95 /* FalseKeyword */:
137152
+ case 104 /* NullKeyword */:
137153
+ return true;
137154
+ case 79 /* Identifier */: {
137155
+ var name = node.escapedText;
137156
+ return isUndefined(name) || ts.isInfinityOrNaNString(name);
137157
+ }
137158
+ }
137159
+ return ts.isLiteralExpression(node);
137145
137160
  }
137146
137161
  function visitFunctionDeclarationLikeForReturnType(decl) {
137147
137162
  if (ts.isArrowFunction(decl)) {
@@ -137219,6 +137234,9 @@ var ts;
137219
137234
  printer.writeNode(4 /* Unspecified */, typeNode, /*sourceFile*/ file, writer);
137220
137235
  });
137221
137236
  }
137237
+ function isUndefined(name) {
137238
+ return name === "undefined";
137239
+ }
137222
137240
  }
137223
137241
  InlayHints.provideInlayHints = provideInlayHints;
137224
137242
  })(InlayHints = ts.InlayHints || (ts.InlayHints = {}));
@@ -146474,6 +146492,7 @@ var ts;
146474
146492
  (function (codefix) {
146475
146493
  var fixMissingMember = "fixMissingMember";
146476
146494
  var fixMissingProperties = "fixMissingProperties";
146495
+ var fixMissingAttributes = "fixMissingAttributes";
146477
146496
  var fixMissingFunctionDeclaration = "fixMissingFunctionDeclaration";
146478
146497
  var errorCodes = [
146479
146498
  ts.Diagnostics.Property_0_does_not_exist_on_type_1.code,
@@ -146495,6 +146514,10 @@ var ts;
146495
146514
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addObjectLiteralProperties(t, context, info); });
146496
146515
  return [codefix.createCodeFixAction(fixMissingProperties, changes, ts.Diagnostics.Add_missing_properties, fixMissingProperties, ts.Diagnostics.Add_all_missing_properties)];
146497
146516
  }
146517
+ if (info.kind === 4 /* JsxAttributes */) {
146518
+ var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addJsxAttributes(t, context, info); });
146519
+ return [codefix.createCodeFixAction(fixMissingAttributes, changes, ts.Diagnostics.Add_missing_attributes, fixMissingAttributes, ts.Diagnostics.Add_all_missing_attributes)];
146520
+ }
146498
146521
  if (info.kind === 2 /* Function */) {
146499
146522
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addFunctionDeclaration(t, context, info); });
146500
146523
  return [codefix.createCodeFixAction(fixMissingFunctionDeclaration, changes, [ts.Diagnostics.Add_missing_function_declaration_0, info.token.text], fixMissingFunctionDeclaration, ts.Diagnostics.Add_all_missing_function_declarations)];
@@ -146505,7 +146528,7 @@ var ts;
146505
146528
  }
146506
146529
  return ts.concatenate(getActionsForMissingMethodDeclaration(context, info), getActionsForMissingMemberDeclaration(context, info));
146507
146530
  },
146508
- fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties],
146531
+ fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes],
146509
146532
  getAllCodeActions: function (context) {
146510
146533
  var program = context.program, fixId = context.fixId;
146511
146534
  var checker = program.getTypeChecker();
@@ -146517,15 +146540,14 @@ var ts;
146517
146540
  if (!info || !ts.addToSeen(seen, ts.getNodeId(info.parentDeclaration) + "#" + info.token.text)) {
146518
146541
  return;
146519
146542
  }
146520
- if (fixId === fixMissingFunctionDeclaration) {
146521
- if (info.kind === 2 /* Function */) {
146522
- addFunctionDeclaration(changes, context, info);
146523
- }
146543
+ if (fixId === fixMissingFunctionDeclaration && info.kind === 2 /* Function */) {
146544
+ addFunctionDeclaration(changes, context, info);
146524
146545
  }
146525
- else if (fixId === fixMissingProperties) {
146526
- if (info.kind === 3 /* ObjectLiteral */) {
146527
- addObjectLiteralProperties(changes, context, info);
146528
- }
146546
+ else if (fixId === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
146547
+ addObjectLiteralProperties(changes, context, info);
146548
+ }
146549
+ else if (fixId === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
146550
+ addJsxAttributes(changes, context, info);
146529
146551
  }
146530
146552
  else {
146531
146553
  if (info.kind === 0 /* Enum */) {
@@ -146581,6 +146603,7 @@ var ts;
146581
146603
  InfoKind[InfoKind["ClassOrInterface"] = 1] = "ClassOrInterface";
146582
146604
  InfoKind[InfoKind["Function"] = 2] = "Function";
146583
146605
  InfoKind[InfoKind["ObjectLiteral"] = 3] = "ObjectLiteral";
146606
+ InfoKind[InfoKind["JsxAttributes"] = 4] = "JsxAttributes";
146584
146607
  })(InfoKind || (InfoKind = {}));
146585
146608
  function getInfo(sourceFile, tokenPos, checker, program) {
146586
146609
  // The identifier of the missing property. eg:
@@ -146597,6 +146620,12 @@ var ts;
146597
146620
  return { kind: 3 /* ObjectLiteral */, token: token, properties: properties, parentDeclaration: parent.initializer };
146598
146621
  }
146599
146622
  }
146623
+ if (ts.isIdentifier(token) && ts.isJsxOpeningLikeElement(token.parent)) {
146624
+ var attributes = getUnmatchedAttributes(checker, token.parent);
146625
+ if (ts.length(attributes)) {
146626
+ return { kind: 4 /* JsxAttributes */, token: token, attributes: attributes, parentDeclaration: token.parent };
146627
+ }
146628
+ }
146600
146629
  if (ts.isIdentifier(token) && ts.isCallExpression(parent)) {
146601
146630
  return { kind: 2 /* Function */, token: token, call: parent, sourceFile: sourceFile, modifierFlags: 0 /* None */, parentDeclaration: sourceFile };
146602
146631
  }
@@ -146825,17 +146854,31 @@ var ts;
146825
146854
  var functionDeclaration = codefix.createSignatureDeclarationFromCallExpression(254 /* FunctionDeclaration */, context, importAdder, info.call, ts.idText(info.token), info.modifierFlags, info.parentDeclaration);
146826
146855
  changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration);
146827
146856
  }
146857
+ function addJsxAttributes(changes, context, info) {
146858
+ var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
146859
+ var quotePreference = ts.getQuotePreference(context.sourceFile, context.preferences);
146860
+ var checker = context.program.getTypeChecker();
146861
+ var jsxAttributesNode = info.parentDeclaration.attributes;
146862
+ var hasSpreadAttribute = ts.some(jsxAttributesNode.properties, ts.isJsxSpreadAttribute);
146863
+ var attrs = ts.map(info.attributes, function (attr) {
146864
+ var value = attr.valueDeclaration ? tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(attr.valueDeclaration)) : createUndefined();
146865
+ return ts.factory.createJsxAttribute(ts.factory.createIdentifier(attr.name), ts.factory.createJsxExpression(/*dotDotDotToken*/ undefined, value));
146866
+ });
146867
+ var jsxAttributes = ts.factory.createJsxAttributes(hasSpreadAttribute ? __spreadArray(__spreadArray([], attrs, true), jsxAttributesNode.properties, true) : __spreadArray(__spreadArray([], jsxAttributesNode.properties, true), attrs, true));
146868
+ var options = { prefix: jsxAttributesNode.pos === jsxAttributesNode.end ? " " : undefined };
146869
+ changes.replaceNode(context.sourceFile, jsxAttributesNode, jsxAttributes, options);
146870
+ }
146828
146871
  function addObjectLiteralProperties(changes, context, info) {
146829
146872
  var importAdder = codefix.createImportAdder(context.sourceFile, context.program, context.preferences, context.host);
146830
146873
  var quotePreference = ts.getQuotePreference(context.sourceFile, context.preferences);
146831
146874
  var checker = context.program.getTypeChecker();
146832
146875
  var props = ts.map(info.properties, function (prop) {
146833
- var initializer = prop.valueDeclaration ? tryGetInitializerValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration)) : createUndefined();
146876
+ var initializer = prop.valueDeclaration ? tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration)) : createUndefined();
146834
146877
  return ts.factory.createPropertyAssignment(prop.name, initializer);
146835
146878
  });
146836
146879
  changes.replaceNode(context.sourceFile, info.parentDeclaration, ts.factory.createObjectLiteralExpression(__spreadArray(__spreadArray([], info.parentDeclaration.properties, true), props, true), /*multiLine*/ true));
146837
146880
  }
146838
- function tryGetInitializerValueFromType(context, checker, importAdder, quotePreference, type) {
146881
+ function tryGetValueFromType(context, checker, importAdder, quotePreference, type) {
146839
146882
  if (type.flags & 3 /* AnyOrUnknown */) {
146840
146883
  return createUndefined();
146841
146884
  }
@@ -146872,7 +146915,7 @@ var ts;
146872
146915
  return ts.factory.createNull();
146873
146916
  }
146874
146917
  if (type.flags & 1048576 /* Union */) {
146875
- var expression = ts.firstDefined(type.types, function (t) { return tryGetInitializerValueFromType(context, checker, importAdder, quotePreference, t); });
146918
+ var expression = ts.firstDefined(type.types, function (t) { return tryGetValueFromType(context, checker, importAdder, quotePreference, t); });
146876
146919
  return expression !== null && expression !== void 0 ? expression : createUndefined();
146877
146920
  }
146878
146921
  if (checker.isArrayLikeType(type)) {
@@ -146880,7 +146923,7 @@ var ts;
146880
146923
  }
146881
146924
  if (isObjectLiteralType(type)) {
146882
146925
  var props = ts.map(checker.getPropertiesOfType(type), function (prop) {
146883
- var initializer = prop.valueDeclaration ? tryGetInitializerValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration)) : createUndefined();
146926
+ var initializer = prop.valueDeclaration ? tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeAtLocation(prop.valueDeclaration)) : createUndefined();
146884
146927
  return ts.factory.createPropertyAssignment(prop.name, initializer);
146885
146928
  });
146886
146929
  return ts.factory.createObjectLiteralExpression(props, /*multiLine*/ true);
@@ -146913,6 +146956,31 @@ var ts;
146913
146956
  return (type.flags & 524288 /* Object */) &&
146914
146957
  ((ts.getObjectFlags(type) & 128 /* ObjectLiteral */) || (type.symbol && ts.tryCast(ts.singleOrUndefined(type.symbol.declarations), ts.isTypeLiteralNode)));
146915
146958
  }
146959
+ function getUnmatchedAttributes(checker, source) {
146960
+ var attrsType = checker.getContextualType(source.attributes);
146961
+ if (attrsType === undefined)
146962
+ return ts.emptyArray;
146963
+ var targetProps = attrsType.getProperties();
146964
+ if (!ts.length(targetProps))
146965
+ return ts.emptyArray;
146966
+ var seenNames = new ts.Set();
146967
+ for (var _i = 0, _a = source.attributes.properties; _i < _a.length; _i++) {
146968
+ var sourceProp = _a[_i];
146969
+ if (ts.isJsxAttribute(sourceProp)) {
146970
+ seenNames.add(sourceProp.name.escapedText);
146971
+ }
146972
+ if (ts.isJsxSpreadAttribute(sourceProp)) {
146973
+ var type = checker.getTypeAtLocation(sourceProp.expression);
146974
+ for (var _b = 0, _c = type.getProperties(); _b < _c.length; _b++) {
146975
+ var prop = _c[_b];
146976
+ seenNames.add(prop.escapedName);
146977
+ }
146978
+ }
146979
+ }
146980
+ return ts.filter(targetProps, function (targetProp) {
146981
+ return !((targetProp.flags & 16777216 /* Optional */ || ts.getCheckFlags(targetProp) & 48 /* Partial */) || seenNames.has(targetProp.escapedName));
146982
+ });
146983
+ }
146916
146984
  })(codefix = ts.codefix || (ts.codefix = {}));
146917
146985
  })(ts || (ts = {}));
146918
146986
  /* @internal */
@@ -160025,12 +160093,6 @@ var ts;
160025
160093
  /** Completion was re-triggered as the current completion list is incomplete. */
160026
160094
  CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions";
160027
160095
  })(CompletionTriggerKind = protocol.CompletionTriggerKind || (protocol.CompletionTriggerKind = {}));
160028
- var InlayHintKind;
160029
- (function (InlayHintKind) {
160030
- InlayHintKind["Type"] = "Type";
160031
- InlayHintKind["Parameter"] = "Parameter";
160032
- InlayHintKind["Enum"] = "Enum";
160033
- })(InlayHintKind = protocol.InlayHintKind || (protocol.InlayHintKind = {}));
160034
160096
  var IndentStyle;
160035
160097
  (function (IndentStyle) {
160036
160098
  IndentStyle["None"] = "None";
@@ -167829,9 +167891,9 @@ var ts;
167829
167891
  });
167830
167892
  };
167831
167893
  Session.prototype.provideInlayHints = function (args) {
167832
- var _a = this.getFileAndLanguageServiceForSyntacticOperation(args), file = _a.file, languageService = _a.languageService;
167894
+ var _a = this.getFileAndProject(args), file = _a.file, project = _a.project;
167833
167895
  var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file);
167834
- var hints = languageService.provideInlayHints(file, args, this.getPreferences(file));
167896
+ var hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file));
167835
167897
  return hints.map(function (hint) { return (__assign(__assign({}, hint), { position: scriptInfo.positionToLineOffset(hint.position) })); });
167836
167898
  };
167837
167899
  Session.prototype.setCompilerOptionsForInferredProjects = function (args) {
@@ -5886,7 +5886,7 @@ declare namespace ts {
5886
5886
  interface InlayHint {
5887
5887
  text: string;
5888
5888
  position: number;
5889
- kind?: InlayHintKind;
5889
+ kind: InlayHintKind;
5890
5890
  whitespaceBefore?: boolean;
5891
5891
  whitespaceAfter?: boolean;
5892
5892
  }
@@ -8739,11 +8739,7 @@ declare namespace ts.server.protocol {
8739
8739
  interface SignatureHelpResponse extends Response {
8740
8740
  body?: SignatureHelpItems;
8741
8741
  }
8742
- enum InlayHintKind {
8743
- Type = "Type",
8744
- Parameter = "Parameter",
8745
- Enum = "Enum"
8746
- }
8742
+ type InlayHintKind = "Type" | "Parameter" | "Enum";
8747
8743
  interface InlayHintsRequestArgs extends FileRequestArgs {
8748
8744
  /**
8749
8745
  * Start position of the span.
@@ -8761,7 +8757,7 @@ declare namespace ts.server.protocol {
8761
8757
  interface InlayHintItem {
8762
8758
  text: string;
8763
8759
  position: Location;
8764
- kind?: InlayHintKind;
8760
+ kind: InlayHintKind;
8765
8761
  whitespaceBefore?: boolean;
8766
8762
  whitespaceAfter?: boolean;
8767
8763
  }