1# Copyright (c) 2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14syntax: 15- name: MISSING_TYPE_ANNOTATION 16 id: 1 17 message: "Missing type annotation for property '{}'." 18 19- name: DIFFERENT_PACKAGE_NAME 20 id: 2 21 message: "Files '{}' and '{}' are in the same folder, but have different package names." 22 23- name: PACKAGE_MODULE_IMPORT_OWN_PACKAGE 24 id: 3 25 message: "Package module cannot import from a file in it's own package." 26 27- name: AMBIENT_CLASS_MISSING_BODY 28 id: 4 29 message: "Ambient class declarations must have a body." 30 31- name: EXPORT_DEFAULT_WITH_MUPLTIPLE_SPECIFIER 32 id: 5 33 message: "export default is not allowed to export multiple specifiers." 34 35- name: NAMESPACE_MERGE_ERROR 36 id: 6 37 message: "Unable to merge namespaces '{}', because their modifiers are different." 38 39- name: NAMESPACE_ANNOTATION_CONFLICT 40 id: 7 41 message: "Annotation conflict! Multiple namespace declarations for '{}' cannot each have annotations." 42 43- name: INVALID_NODE_NUMBER 44 id: 8 45 message: "Invalid node number in format expression." 46 47- name: INVALID_NODE_TYPE 48 id: 9 49 message: "Invalid node type in format expression." 50 51- name: INSERT_NODE_ABSENT 52 id: 10 53 message: "There is no any node to insert at the placeholder position." 54 55- name: INVALID_INSERT_NODE 56 id: 11 57 message: "Inserting node type differs from that required by format specification." 58 59- name: INVALID_CLASS_FIELD 60 id: 12 61 message: "Cannot parse class field definition property." 62 63- name: INVALID_CLASS_METHOD 64 id: 13 65 message: "Cannot parse class method definition property." 66 67- name: REQUIRED_PARAM_AFTER_DEFAULT 68 id: 14 69 message: "Required parameter follows default parameter(s)." 70 71- name: REST_AND_DEFAULT_SAME_TIME 72 id: 15 73 message: "Both optional and rest parameters are not allowed in function's parameter list." 74 75- name: UNEXPECTED_TOKEN 76 id: 16 77 message: "Unexpected token." 78 79- name: INDEX_TYPE_EXPECTED 80 id: 17 81 message: "Index type expected in index signature." 82 83- name: INDEX_TYPE_NOT_NUMBER 84 id: 18 85 message: "Index type must be number in index signature." 86 87- name: EXPECTED_BRACKETS_IN_INDEX 88 id: 19 89 message: "] expected in index signature." 90 91- name: INDEX_MISSING_TYPE 92 id: 20 93 message: "An index signature must have a type annotation." 94 95- name: INDEX_MISSING_IDENTIFIER 96 id: 21 97 message: "Return type of index signature from exported class or interface need to be identifier." 98 99- name: EXTENSION_GETTER_WRONG_PARAM 100 id: 22 101 message: "Extension Getter can only have 1 parameter." 102 103- name: EXTENSION_SETTER_WRONG_PARAM 104 id: 23 105 message: "Extension Setter can only have 2 parameters." 106 107- name: ANNOTATION_PROPERTY_ACCESS_MODIFIERS 108 id: 24 109 message: "Annotation property can not have access modifiers." 110 111- name: ANNOTATION_METHOD_AS_PROP 112 id: 25 113 message: "Annotation can not have method as property." 114 115- name: INVALID_ARGUMENT_PASSED 116 id: 26 117 message: "Invalid argument passed to '{}'." 118 119- name: INVALID_VAL_ANNOTATION_FIELD 120 id: 27 121 message: "Invalid value for annotation field, expected a constant literal." 122 123- name: ANNOTATION_WRONG_DEC 124 id: 28 125 message: "Annotations are not allowed on this type of declaration." 126 127- name: ANNOTATION_ABSTRACT 128 id: 29 129 message: "Annotations are not allowed on an abstract class or methods." 130 131- name: LOCAL_CLASS_ACCESS_MOD 132 id: 30 133 message: "Local class or interface declaration members can not have access modifies." 134 135- name: GETTER_SETTER_NOT_ABSTRACT 136 id: 31 137 message: "Getter and setter methods must be abstracts in the interface body." 138 139- name: PRIVATE_INTERFACE_MISSING_BODY 140 id: 32 141 message: "Private interface methods must have body." 142 143- name: READONLY_INTERFACE_METHOD 144 id: 33 145 message: "Modifier 'readonly' cannot be applied to an interface method." 146 147- name: MULTIPLE_STATIC_BLOCK 148 id: 34 149 message: "Only one static block is allowed in one namespace or class." 150 151- name: INVALID_ENUM_TYPE 152 id: 35 153 message: "Invalid enum initialization type." 154 155- name: ENUM_INVALID_INIT 156 id: 36 157 message: "Invalid enum initialization value" 158 159- name: ONLY_CALL_AFTER_LAUNCH 160 id: 37 161 message: "Only call expressions are allowed after 'launch'." 162 163- name: MISSING_LOOP_AFTER_LABEL 164 id: 38 165 message: "Label must be followed by a loop statement." 166 167- name: MISSING_CATCH_OR_FINALLY_AFTER_TRY 168 id: 39 169 message: "A try statement should contain either finally clause or at least one catch clause." 170 171- name: ILLEGAL_START_STRUCT_CLASS 172 id: 40 173 message: "Illegal start of {} expression." 174 175- name: ONLY_EXPORT_CLASS_OR_INTERFACE 176 id: 41 177 message: "Can only type export class or interface." 178 179- name: INVALID_EXPORT_DEFAULT 180 id: 42 181 message: "Can not export annotation default." 182 183- name: EXPORT_NON_DECLARATION 184 id: 43 185 message: "Export is allowed only for declarations." 186 187- name: THIS_IN_NON_STATIC_METHOD 188 id: 44 189 message: "A 'this' type is available only as return type in a non-static method of a class or struct and extension functions." 190 191- name: UNEXPECTED_ID 192 id: 45 193 message: "Unexpected identifier." 194 195- name: AWAIT_IN_ARROW_FUN_PARAM 196 id: 46 197 message: "await is not allowed in arrow function parameters." 198 199- name: UNEXPECTED_PRIVATE 200 id: 47 201 message: "Unexpected private identifier." 202 203- name: IMPORT_META_DIRECT_EVAL 204 id: 48 205 message: "'import.Meta' is not allowed in direct eval in module code." 206 207- name: INVALID_DESTRUCTURING_TARGET 208 id: 49 209 message: "Invalid destructuring assignment target." 210 211- name: DELETING_LOCAL_VAR 212 id: 50 213 message: "Deleting local variable in strict mode." 214 215- name: ASSIGN_TO_EVAL_INVALID 216 id: 51 217 message: "Assigning to 'eval' in strict mode is invalid." 218 219- name: EXPECTED_EXPRESSION_GOT_ARROW 220 id: 52 221 message: "Expected expression, got '=>'." 222 223- name: INVALID_LEFT_SITE_OPERATOR 224 id: 53 225 message: "Invalid left-hand side operator." 226 227- name: YIELD_IN_GENERATOR_PARAM 228 id: 54 229 message: "Yield is not allowed in generator parameters." 230 231- name: INVALID_REST_ELEMENT 232 id: 55 233 message: "Invalid rest element." 234 235- name: TAGGED_TEMPLATE_LITERALS_IN_OPTIONALCHAIN 236 id: 56 237 message: "Tagged Template Literals are not allowed in optionalChain." 238 239- name: ASSIGN_TO_ARGS_INVALID 240 id: 57 241 message: "Assigning to 'arguments' in strict mode is invalid." 242 243- name: GETTER_FORMAL_PARAMS 244 id: 58 245 message: "Getter must not have formal parameters." 246 247- name: NULLISH_COALESCING_MISSING_PARENS 248 id: 59 249 message: "Nullish coalescing operator ?? requires parens when mixing with logical operators." 250 251- name: NEW_WITH_IMPORT 252 id: 60 253 message: "Cannot use new with import(...)." 254 255- name: UNEXPECTED_SUPER 256 id: 61 257 message: "Unexpected super keyword." 258 259- name: OBJECT_PATTER_CONTAIN_METHODS 260 id: 62 261 message: "Object pattern can't contain methods." 262 263- name: SETTER_FORMAL_PARAMS 264 id: 63 265 message: "Setter must have exactly one formal parameter." 266 267- name: INSUFFICIENT_PARAM_IN_ARROW_FUN 268 id: 64 269 message: "Insufficient formal parameter in arrow function." 270 271- name: ILLEGAL_AWAIT_IN_ASYNC_FUN 272 id: 65 273 message: "Illegal await-expression in formal parameters of async function." 274 275- name: YIELD_IN_ARROW_FUN_PARAM 276 id: 66 277 message: "yield is not allowed in arrow function parameters." 278 279- name: REST_PARAM_NOT_LAST 280 id: 67 281 message: "Rest parameter must be the last formal parameter." 282 283- name: META_PROP_FOR_IMPORT 284 id: 68 285 message: "The only valid meta property for import is import.Meta." 286 287- name: IMPORT_META_ONLY_MODULE 288 id: 69 289 message: "'import.Meta' may appear only with 'sourceType: module'." 290 291- name: DELETING_PRIVATE_FIELDS 292 id: 70 293 message: "Private fields can not be deleted." 294 295- name: INVALID_LEFT_IN_PREFIX 296 id: 71 297 message: "Invalid left-hand side in prefix operation." 298 299- name: INVALID_LEFT_SIDE_IN_ASSIGNMENT 300 id: 72 301 message: "Invalid left-hand side in assignment expression." 302 303- name: NEW_TARGET_IS_NOT_ALLOWED 304 id: 73 305 message: "'new.Target' is not allowed here." 306 307- name: NEW_TARGET_WITH_ESCAPED_CHARS 308 id: 74 309 message: "'new.Target' must not contain escaped characters." 310 311- name: INVALID_CLOSING_PARENTHESIS 312 id: 75 313 message: "Invalid closing parenthesis." 314 315- name: INVALID_CAPTURING_GROUP 316 id: 76 317 message: "Invalid capturing group." 318 319- name: INVALID_CHAR 320 id: 77 321 message: "Invalid character." 322 323- name: QUANTIFIER_OUT_OF_ORDER 324 id: 78 325 message: "Quantifier range out of order." 326 327- name: INVALIDE_CHAR_CLASS 328 id: 79 329 message: "Invalid character class." 330 331- name: CLASS_OUT_OF_ORDER 332 id: 80 333 message: "Class range out of order." 334 335- name: INVALID_DECIMAL_ESCAPE 336 id: 81 337 message: "Invalid decimal escape." 338 339- name: DUPLICATE_GROUP_NAME 340 id: 82 341 message: "Duplicate group name." 342 343- name: INVALID_HEX_ESCAPE 344 id: 83 345 message: "Invalid hex escape." 346 347- name: INVALID_GROUP_NAME 348 id: 84 349 message: "Invalid group name." 350 351- name: INVALID_GROUP 352 id: 85 353 message: "Invalid group." 354 355- name: UNTERMINATED_UNICODE_PROP_ESCAPE 356 id: 86 357 message: "Unterminated Unicode property escape." 358 359- name: INVALID_ESCAPE 360 id: 87 361 message: "Invalid escape." 362 363- name: INVALID_QUANTIFIER 364 id: 88 365 message: "Invalid quantifier, nothing to repeat." 366 367- name: INVALID_NAME_BACKREFERENCE 368 id: 89 369 message: "Invalid named backreference." 370 371- name: INVALID_NON_CAPTURING_GROUP 372 id: 90 373 message: "Invalid non-capturing group." 374 375- name: INVALID_UNICODE_ESCAPE 376 id: 91 377 message: "Invalid Unicode escape." 378 379- name: INVALID_CONTROL_ESCAPE 380 id: 92 381 message: "Invalid control escape." 382 383- name: INVALID_ASSERT 384 id: 93 385 message: "Invalid assertion." 386 387- name: INVALID_UNICODE_PROP_ESCAPE 388 id: 94 389 message: "Invalid Unicode property escape." 390 391- name: UNEXPECTED_TOKEN_AS 392 id: 95 393 message: "Unexpected token, expected 'as'." 394 395- name: OPTIONAL_VAR_IN_FOR_OF 396 id: 96 397 message: "Optional variable is not allowed in for of statements." 398 399- name: FOR_AWAIT_OF_VAR_NOT_INIT 400 id: 97 401 message: "for-await-of loop variable declaration may not have an initializer." 402 403- name: VARIANCE_NOD_ALLOWED 404 id: 98 405 message: "Variance modifier is not allowed here." 406 407- name: FUN_PARAM_THIS_MISSING_TYPE 408 id: 99 409 message: "The function parameter 'this' must explicitly specify the typeAnnotation." 410 411- name: MISSING_INIT_OR_CONST_DEC 412 id: 100 413 message: "Missing initializer in const declaration." 414 415- name: CATCH_CLAUSE_VAR_HAS_INIT 416 id: 101 417 message: "Catch clause variable cannot have an initializer." 418 419- name: ASTERIKS_NOT_ALLOWED_IN_SELECTIVE_BINDING 420 id: 102 421 message: "The '*' token is not allowed as a selective binding (between braces)." 422 423- name: ONLY_THROWS_IN_FUN_TYPE 424 id: 103 425 message: "Only 'throws' can be used with function types." 426 427- name: DECALRE_IN_AMBIENT_CONTEXT 428 id: 104 429 message: "A 'declare' modifier cannot be used in an already ambient context." 430 431- name: MISSING_INIT_OR_TYPE 432 id: 105 433 message: "Variable must be initialized or it's type must be declared." 434 435- name: ASYNC_IN_AMBIENT_CONTEXT 436 id: 106 437 message: "The modifier async cannot be used in an ambient context." 438 439- name: MODIFIERS_OF_GET_SET_LIMITED 440 id: 107 441 message: "Modifiers of getter and setter are limited to ('abstract', 'static', 'final', 'override', 'native')." 442 443- name: ESCAPE_SEQUENCES_IN_AS 444 id: 108 445 message: "Escape sequences are not allowed in 'as' keyword." 446 447- name: LOCAL_TYPE_DEC_NO_IMPLEMENTED 448 id: 109 449 message: "Local type declaration (class, struct, interface and enum) support is not yet implemented." 450 451- name: TYPE_IMPORT_MISSING_SELECTIVE_BINDING 452 id: 110 453 message: "Type import requires selective binding to define the required imported elements." 454 455- name: EXPORT_IN_NAMESPACE 456 id: 111 457 message: "Export declarations are not permitted in a namespace." 458 459- name: UNEXPECTED_TOKEN_ID 460 id: 112 461 message: "Unexpected token, expected an identifier." 462 463- name: ANNOTATION_NOT_ALLOWED 464 id: 113 465 message: "Annotations cannot be applied here." 466 467- name: ANNOTATION_ONLY_TOP_LEVEL 468 id: 114 469 message: "Annotations can only be declared at the top level." 470 471- name: DUPLICATED_MODIFIER 472 id: 115 473 message: "Duplicated modifier is not allowed." 474 475- name: NATIVE_METHOD_ASYNC 476 id: 116 477 message: "Native method cannot be async." 478 479- name: KEYWORD_CONTAINS_ESCAPED_CHARS 480 id: 117 481 message: "Keyword must not contain escaped characters." 482 483- name: ABSTRACT_METHOD_ASYNC 484 id: 118 485 message: "Abstract method cannot be async." 486 487- name: INTERFACE_FIELDS_TYPE_ANNOTATION 488 id: 119 489 message: "Interface fields must have type annotation." 490 491- name: ACCESS_BEFORE_FIELD_METHOD 492 id: 120 493 message: "Access modifier must precede field and method modifiers." 494 495- name: FIELD_TPYE_ANNOTATION_MISSING 496 id: 121 497 message: "Field type annotation expected." 498 499- name: ID_EXPECTED 500 id: 122 501 message: "Identifier expected." 502 503- name: INITIALIZERS_INTERFACE_PROPS 504 id: 123 505 message: "Initializers are not allowed on interface properties." 506 507- name: UNEXPECTED_TOKEN_PRIVATE_ID 508 id: 124 509 message: "Unexpected token, expected 'private' or identifier." 510 511- name: INITIALIZERS_IN_AMBIENT_CONTEXTS 512 id: 125 513 message: "Initializers are not allowed in ambient contexts." 514 515- name: VAR_DEC_EXPECTED 516 id: 126 517 message: "Variable declaration expected." 518 519- name: CONFLICTING_FIELD_MODIFIERS 520 id: 127 521 message: "Conflicting modifiers '!' and '?' on field." 522 523- name: VALUE_IS_NOT_SET 524 id: 128 525 message: "You didn't set the value." 526 527- name: TYPE_ALIAS_ONLY_TOP_LEVEL 528 id: 129 529 message: "Type alias is allowed only as top-level declaration." 530 531- name: INVALID_RIGHT_INSTANCEOF 532 id: 130 533 message: "Invalid right-hand side in 'instanceof' expression." 534 535- name: IDENTIFIER_EXPECTED 536 id: 131 537 message: "Identifier is needed here." 538 539- name: DEFAULT_UNDEF_NOT_ALLOWED 540 id: 132 541 message: "Not enable default value with default undefined." 542 543- name: DEFAULT_ONLY_FOR_OPTIONAL 544 id: 133 545 message: "Default value is allowed only for optional parameters." 546 547- name: NAMESPACE_ONLY_TOP_OR_IN_NAMESPACE 548 id: 134 549 message: "Namespace is allowed only at the top level or inside a namespace." 550 551- name: NESTED_FUNCTIONS_NOT_ALLOWED 552 id: 135 553 message: "Nested functions are not allowed." 554 555- name: SPREAD_MUST_BE_LAST_IN_TUPLE 556 id: 136 557 message: "Spread type must be at the last index in the tuple type." 558 559- name: PRIMITIVE_NOT_ALLOWED 560 id: 137 561 message: "Primitive type is not allowed here." 562 563- name: INVALID_TYPE 564 id: 138 565 message: "Invalid Type." 566 567- name: SPREAD_TYPE_MUST_BE_ARRAY 568 id: 139 569 message: "Spread type must be an array type." 570 571- name: TYPE_ANNOTATION_FOR_CONSTRUCTOR 572 id: 140 573 message: "Type annotation isn't allowed for constructor." 574 575- name: READONLY_ONLY_ON_ARRAY_OR_TUPLE 576 id: 141 577 message: "'readonly' type modifier is only permitted on resizable array and tuple types." 578 579- name: OPTIONAL_TYPES_IN_TUPLE_NOT_IMPLEMENTED 580 id: 142 581 message: "Optional types in tuples are not yet implemented." 582 583- name: ONLY_SPREAD_AT_LAST_INDEX 584 id: 143 585 message: "Only one spread type declaration allowed, at the last index." 586 587- name: CLASS_FIELD_CONSTRUCTOR 588 id: 144 589 message: "Classes may not have a field named 'constructor'." 590 591- name: NOT_ALLOWED_USER_DEFINED_TYPE 592 id: 145 593 message: "Cannot be used as user-defined type." 594 595- name: EXTENSION_ACCESSOR_RECEIVER 596 id: 146 597 message: "Extension Accessor must have a receiver." 598 599- name: UNEXPECTED_TOKEN_ID_FUN 600 id: 147 601 message: "Unexpected token, expected function identifier." 602 603- name: UNEXPECTED_ARROWPARAM_ELEMENT 604 id: 148 605 message: "Unexpected ArrowParameter element." 606 607- name: SPECIAL_METHOD_CONSTRUCTOR 608 id: 149 609 message: "Constructor can not be special method." 610 611- name: TRAILING_COMMA_NOT_ALLOWED 612 id: 150 613 message: "Trailing comma is not allowed in this context." 614 615- name: UNEXPECTED_TOKEN_STRING_LITERAL 616 id: 151 617 message: "Unexpected token, expected string literal." 618 619- name: RESTPARAM_INIT 620 id: 152 621 message: "RestParameter does not support an initializer." 622 623- name: UNEXPECTED_MODIFIER 624 id: 153 625 message: "Unexpected modifier." 626 627- name: PRIVATE_FIELD_REDEC 628 id: 154 629 message: "Private field has already been declared." 630 631- name: STATIC_PROPERTY_PROTOTYPE 632 id: 155 633 message: "Classes may not have static property named prototype." 634 635- name: RESTPARAM_ID_IN_DEC_CONTEXT 636 id: 156 637 message: "RestParameter must be followed by an identifier in declaration contexts" 638 639- name: DECLARE_MODIFIER_ON_INVALID_CLASS_ELEMENT 640 id: 157 641 message: "'declare modifier cannot appear on class elements of this kind." 642 643- name: FUNC_PARAM_THIS_FIRST 644 id: 158 645 message: "Function Parameter 'this' must be the first." 646 647- name: INVALID_ACCESSOR 648 id: 159 649 message: "Invalid accessor." 650 651- name: INVALID_ANNOTATION_NAME 652 id: 329 653 message: "Invalid annotation name." 654 655- name: UNEXPECTED_TOKEN_IN_PRIVATE 656 id: 160 657 message: "Unexpected token in private field." 658 659- name: WITH_DEPRECATED 660 id: 161 661 message: "'With' is deprecated and not supported any more." 662 663- name: UNDEFINED_LABEL 664 id: 162 665 message: "Undefined label." 666 667- name: RETURN_IN_FUN_BODY 668 id: 163 669 message: "return keyword should be used in function body." 670 671- name: FOR_IN_LOOP_HAS_INIT 672 id: 164 673 message: "for-in loop variable declaration may not have an initializer." 674 675- name: ILLEGALE_CONTINUE 676 id: 165 677 message: "Illegal continue statement." 678 679- name: IMPORT_EXPORT_ONLY_AT_TOP_LEVEL 680 id: 166 681 message: "'import' and 'export' may only appear at the top level." 682 683- name: INVALID_LEFT_FOR_IN_OF 684 id: 167 685 message: "Invalid left-hand side in 'For[In/Of]Statement'." 686 687- name: FOR_OF_LOOP_HAS_INIT 688 id: 168 689 message: "for-of loop variable declaration may not have an initializer." 690 691- name: MISSING_CATCH_OR_FINALLY 692 id: 169 693 message: "Missing catch or finally clause." 694 695- name: UNEXPECTED_TOKEN_WHILE 696 id: 170 697 message: "Unexpected token, expected 'while'." 698 699- name: MULTIPLE_DEFAULT 700 id: 171 701 message: "Multiple default clauses." 702 703- name: ILLEGAL_NEW_LINE 704 id: 172 705 message: "Illegal newline after throw." 706 707- name: GENERATORS_ONLY_TOP_LEVEL_OR_INSIDE_BLOCK 708 id: 173 709 message: "Generators can only be declared at the top level or inside a block." 710 711- name: INVALID_LEFT_FOR_IN 712 id: 174 713 message: "Invalid left-hand side in for-in statement." 714 715- name: LEXICAL_DEC_NOT_ALLOWED_IN_SINGLE_STATEMENT_CONTEXT 716 id: 175 717 message: "Lexical declaration is not allowed in single statement context." 718 719- name: TYPE_PARAM_DEC_EXPECTED 720 id: 176 721 message: "Type parameter declaration expected." 722 723- name: INTERFACE_DEC_IMPLEMENTS 724 id: 177 725 message: "Interface declaration cannot have 'implements' clause." 726 727- name: UNEXPECTED_TOKEN_ENUM 728 id: 178 729 message: "Unexpected token in enum member." 730 731- name: REQUIRED_TYPE_PARAM_AFTER_OPTIONAL 732 id: 179 733 message: "Required type parameters may not follow optional type parameters." 734 735- name: INTERFACE_MEMBER_INIT_NOT_ALLOWED 736 id: 180 737 message: "Interface member initialization is prohibited." 738 739- name: ONLY_AMBIENT_MODULES_QUOTED_NAMES 740 id: 181 741 message: "Only ambient modules can use quoted names." 742 743- name: BINDING_ARGS_INVALID 744 id: 182 745 message: "Binding 'arguments' in strict mode is invalid." 746 747- name: DECORATORS_INVALID 748 id: 183 749 message: "Decorators are not valid here." 750 751- name: ABSTRACT_METHODS_ONLY_IN_ABSTRACT_CLASS 752 id: 184 753 message: "Abstract methods can only appear within an abstract class." 754 755- name: IMPLEMENTS_CLAUSE_EMPTY 756 id: 185 757 message: "Implements clause can not be empty." 758 759- name: MISSING_INIT_IN_DEST_DEC 760 id: 186 761 message: "Missing initializer in destructuring declaration." 762 763- name: UNEXPECTED_TOKEN_FOR_PARAM 764 id: 187 765 message: "Unexpected '?' for parameter." 766 767- name: TYPE_EXPECTED 768 id: 188 769 message: "Type expected." 770 771- name: OVERRIDE_IN_INTERFACE 772 id: 189 773 message: "'override' modifier cannot appear in interfaces." 774 775- name: BINDING_EVAL_INVALID 776 id: 190 777 message: "Binding 'eval' in strict mode is invalid." 778 779- name: TYPE_PARAM_LIST_EMPTY 780 id: 191 781 message: "Type parameter list cannot be empty." 782 783- name: NO_DEFAULT_FOR_REST 784 id: 192 785 message: "Rest parameter cannot have the default value." 786 787- name: ONLY_ARRAY_OR_TUPLE_FOR_REST 788 id: 193 789 message: "Rest parameter should be either array or tuple type." 790 791- name: EXPLICIT_PARAM_TYPE 792 id: 194 793 message: "Parameter declaration should have an explicit type annotation." 794 795- name: EXPECTED_ARROW_SAME_LINE 796 id: 195 797 message: "expected '=>' on the same line after an argument list, got line terminator." 798 799- name: ILLEGAL_EXPRESSION_WRAP 800 id: 196 801 message: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses." 802 803- name: ASYNC_METHOD_LINE_TERM 804 id: 197 805 message: "Async methods cannot have a line terminator between 'async' and the property name." 806 807- name: STRICT_MODE_FUNC_DECL 808 id: 198 809 message: "In strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement." 810 811- name: ILLEGAL_USE_STRICT 812 id: 199 813 message: "Illegal 'use strict' directive in function with non-simple parameter list." 814 815- name: ASYNC_CONSTRUCTOR 816 id: 200 817 message: "Constructor should not be async." 818 819- name: INVALID_DECORATOR_CONSTRUCTOR 820 id: 201 821 message: "The modifier for a constructor should be limited to access modifiers (private, internal, protected, public), and 'native' modifiers." 822 823- name: ASYNC_FLAG_ONLY_FOR_TOP_FUN 824 id: 202 825 message: "'async' flags must be used for functions only at top-level." 826 827- name: NATIVE_FLAG_ONLY_FOR_TOP_FUN 828 id: 203 829 message: "'native' flags must be used for functions only at top-level." 830 831- name: INVALID_LEFT_SIDE_ARRAY_DESTRUCTURING 832 id: 204 833 message: "Invalid left-hand side in array destructuring pattern." 834 835- name: GET_ACCESSOR_MUST_BE_AT_LEAST_AS_ACCESSIBLE 836 id: 205 837 message: "A get accessor must be at least as accessible as the setter." 838 839- name: MULTIPLE_CONSTRUCTOR_IMPLEMENTATIONS 840 id: 206 841 message: "Multiple constructor implementations are not allowed." 842 843- name: EVAL_OR_ARGUMENTS_IN_STRICT_MODE 844 id: 207 845 message: "'eval' or 'arguments' can't be defined or assigned to in strict mode code." 846 847- name: ILLEGAL_START_EXPRESSION 848 id: 208 849 message: "Illegal start of expression." 850 851- name: ILLEGAL_BREAK 852 id: 209 853 message: "Illegal break statement." 854 855- name: ANNOTATION_DECLARATION_ACCESS_MODIFIER 856 id: 210 857 message: "Annotation declaration can not have access modifier." 858 859- name: INVALID_LEFT_HAND_IN_FOR_OF 860 id: 211 861 message: "Invalid left-hand side in 'for' statement: must have a single binding." 862 863- name: INVALID_TYPE_ANNOTATION_IN_FOR 864 id: 212 865 message: "Type annotation is not allowed when existing variable is used as loop iterator in 'for' statement." 866 867- name: AWAIT_RESERVED_IDENTIFIER_IN_MODULE 868 id: 213 869 message: "'await' is a reserved identifier in module code." 870 871- name: LABEL_ALREADY_DECLARED 872 id: 214 873 message: "Label already declared." 874 875- name: DUPLICATED_IDENTIFIER 876 id: 215 877 message: "Duplicated identifier." 878 879- name: PARAM_CANNOT_HAVE_QUESTION_MARK 880 id: 216 881 message: "Parameter cannot have question mark and initializer." 882 883- name: BINDING_PATTERN_PARAM_CANNOT_BE_OPTIONAL 884 id: 217 885 message: "A binding pattern parameter cannot be optional in an implementation signature." 886 887- name: REST_PARAM_CANNOT_BE_OPTIONAL 888 id: 218 889 message: "A rest parameter cannot be optional." 890 891- name: REQUIRED_PARAM_AFTER_OPTIONAL 892 id: 219 893 message: "A required parameter cannot follow an optional parameter." 894 895- name: SPECIAL_PREDEFINED_METHOD_CANNOT_BE_ASYNC 896 id: 220 897 message: "The special predefined method '{}' cannot be asynchronous." 898 899- name: SPECIAL_PREDEFINED_METHOD_SHOULD_HAVE_ONE_PARAM 900 id: 221 901 message: "The special predefined method '{}' should have exactly one required parameter." 902 903- name: SPECIAL_PREDEFINED_METHOD_SHOULD_HAVE_TWO_PARAMS 904 id: 222 905 message: "The special predefined method '{}' should have exactly two required parameter." 906 907- name: SPECIAL_PREDEFINED_METHOD_SHOULD_NOT_HAVE_PARAMS 908 id: 223 909 message: "The special predefined method '{}' should not have parameters." 910 911- name: IDENTIFIER_EXPECTED_HERE 912 id: 224 913 message: "Identifier expected, got '{}'." 914 915- name: TYPE_ALIAS_INVALID_NAME 916 id: 225 917 message: "Type alias name cannot be '{}'." 918 919- name: IMPORT_TOP_LEVEL 920 id: 226 921 message: "Import declarations can only be used on the top level and before any other declaration, top level statement or directive." 922 923- name: UNEXPECTED_TOKEN_PARAM 924 id: 227 925 message: "Unexpected token '{}'." 926 927- name: UNEXPECTED_TOKEN_EXPECTED_PARAM 928 id: 228 929 message: "Unexpected token, expected '{}'." 930 931- name: UNEXPECTED_TOKEN_EXPECTED_PARAM_OR_PARAM 932 id: 229 933 message: "Unexpected token, expected '{}' or '{}'." 934 935- name: EXPECTED_PARAM_GOT_PARAM 936 id: 230 937 message: "Expected '{}', got '{}'." 938 939- name: UNEXPECTED_TOKEN_PARAM_EXPECTED_CASE_OR_DEFAULT 940 id: 231 941 message: "Unexpected token '{}', expected 'case' or 'default'." 942 943- name: PARAM_MODIFIER_CANNOT_APPEAR_ON_PARAMETER 944 id: 232 945 message: "'{}' modifier cannot appear on a parameter." 946 947- name: IMPROPER_NESTING_CLASS 948 id: 233 949 message: "Unexpected token. A constructor, method, accessor, or property was expected." 950 951- name: IMPROPER_NESTING_INTERFACE 952 id: 234 953 message: "Property or signature expected." 954 955- name: UNEXPECTED_DEFAULT 956 id: 235 957 message: "Unexpected token 'default'. Only declarations are allowed after 'export default'." 958 959- name: REST_PARAM_LAST 960 id: 236 961 message: "Rest parameter should be the last one." 962 963- name: READONLY_TYPE_EXPECTED 964 id: 237 965 message: "Readonly<T> utility type expected but readonly<T> found." 966 967- name: PROHIBITED_ACCESS_MODIFIER_IN_AMBIENT_CLASS 968 id: 238 969 message: "Methods or fields should not be decorated with {} in ambient class." 970 971- name: INVALID_OCTAL_DIGIT 972 id: 239 973 message: "Invalid octal digit." 974 975- name: UNEXPECTED_THIS 976 id: 240 977 message: "Unexpected 'this' keyword in non-receiver context." 978 979- name: SETTER_NO_RETURN_TYPE 980 id: 241 981 message: "Setter must not have return type even if it is void." 982 983- name: USING_RESERVED_NAME_AS_VARIABLE_OR_TYPE_NAME 984 id: 242 985 message: "'{}' is reserved and cannot be used as a variable/type name" 986 987- name: UNHANDLED_THROW_IN_INITIALIZER 988 id: 243 989 message: "Unhandled throw statement." 990 991- name: EXPORT_DEFAULT_NO_REEXPORT 992 id: 244 993 message: "Cannot use 'export default' in re-export context" 994 995- name: UNTERMINATED_MULTI_LINE_COMMENT 996 id: 245 997 message: "Unterminated multi-line comment." 998 999- name: INVALID_REGEX_FLAG 1000 id: 246 1001 message: "Invalid RegExp flag." 1002 1003- name: OCTAL_ESCAPE_IN_TEMPLATE_STRINGS 1004 id: 247 1005 message: "Octal escape sequences are not allowed in template strings." 1006 1007- name: HEXADECIMAL_EXPECTED 1008 id: 248 1009 message: "Hexadecimal digit expected." 1010 1011- name: INVALID_NUM 1012 id: 249 1013 message: "Invalid number." 1014 1015- name: INVALID_NUMERIC_SEP_AT_END_OF_NUM 1016 id: 250 1017 message: "Numeric separators are not allowed at the end of numeric literals." 1018 1019- name: INVALID_NUMERIC_LIT 1020 id: 251 1021 message: "Invalid numeric literal." 1022 1023- name: NUMERIC_SEP_UNDERSCORE_IN_NUMBER 1024 id: 252 1025 message: "Numeric separator '_' is not allowed in numbers that start with '0'." 1026 1027- name: UNTERMINATED_STRING 1028 id: 253 1029 message: "Unterminated string." 1030 1031- name: INVALID_NUMERIC_SEP 1032 id: 254 1033 message: "Invalid numeric separator." 1034 1035- name: INVALID_BIGINT 1036 id: 255 1037 message: "Invalid BigInt number." 1038 1039- name: NON_OCTAL_DECIAML_INTEGER_LIT_IN_STRICT_MODE 1040 id: 256 1041 message: "NonOctalDecimalIntegerLiteral is not enabled in strict mode code." 1042 1043- name: IMPLICIT_OCTAL_NOT_ALLOWED 1044 id: 257 1045 message: "Implicit octal literal not allowed." 1046 1047- name: INVALID_CHAR_ESCAPE 1048 id: 258 1049 message: "Invalid character escape sequence." 1050 1051- name: UNEXPECTED_TOKEN_EXPECTED_BACKTICK_OR_DOLLAR_LBRACE 1052 id: 259 1053 message: "Unexpected token, expected '${' or '`'" 1054 1055- name: UNTERMINATED_REGEX 1056 id: 260 1057 message: "Unterminated RegExp." 1058 1059- name: UNSUPPORTED_CHAR_LIT 1060 id: 261 1061 message: "Unsupported character literal." 1062 1063- name: TOO_LARGE_NUM 1064 id: 262 1065 message: "Number is too large." 1066 1067- name: INVALID_IDENTIFIER_PART 1068 id: 263 1069 message: "Invalid identifier part." 1070 1071- name: UNEXPECTED_STRICT_MODE_RESERVED_KEYWORD 1072 id: 264 1073 message: "Unexpected strict mode reserved keyword." 1074 1075- name: NEWLINE_NOT_ALLOWED_IN_STRING 1076 id: 265 1077 message: "Newline is not allowed in strings" 1078 1079- name: INVALID_DIGIT 1080 id: 266 1081 message: "Invalid digit." 1082 1083- name: PRIVATE_IDENTIFIER_NOT_CONSTRUCTOR 1084 id: 267 1085 message: "Private identifier can not be constructor." 1086 1087- name: PRIVATE_IDENTIFIER_STRING 1088 id: 268 1089 message: "Private identifier name can not be string." 1090 1091- name: PRIVATE_IDENTIFIER_NUMBER 1092 id: 269 1093 message: "Private identifier name can not be number." 1094 1095- name: UNEXPECTED_CHAR_PRIVATE_IDENTIFIER 1096 id: 270 1097 message: "Unexpected character in private identifier." 1098 1099- name: ESCAPE_SEQUENCES_IN_KEYWORD 1100 id: 271 1101 message: "Escape sequences are not allowed in keyword." 1102 1103- name: ONLY_CONSTANT_EXPRESSION 1104 id: 272 1105 message: "Only constant expression is expected in the field" 1106 1107- name: DIVISION_BY_ZERO 1108 id: 273 1109 message: "Division by zero are not allowed in Enum or Annotation." 1110 1111- name: UNSUPPORTED_OPERATOR_FOR_STRING 1112 id: 274 1113 message: "Unsupported operator for String." 1114 1115- name: STRING_INTERPOLATION_NOT_CONSTANT 1116 id: 275 1117 message: "String Interpolation Expression is not constant expression." 1118 1119- name: ENUM_STRING_TYPE_ALL_ITEMS_INIT 1120 id: 276 1121 message: "All items of string-type enumeration should be explicitly initialized." 1122 1123- name: UNEXPECTED_CHAR_ETSNOLINT 1124 id: 277 1125 message: "Unexpected character for ETSNOLINT argument! [VALID ONLY: a-z, '-']." 1126 1127- name: INVALID_ARGUMENT_ETSNOLINT 1128 id: 278 1129 message: "Invalid argument for ETSNOLINT!" 1130 1131- name: CAN_NOT_FIND_NAME_TO_EXPORT 1132 id: 279 1133 message: "Cannot find name '{}' to export." 1134 1135- name: CAN_NOT_RENAME_ANNOTATION 1136 id: 280 1137 message: "Can not rename annotation '{}' in export or import statements." 1138 1139- name: DUPLICATE_EXPORT_NAME 1140 id: 281 1141 message: "The given name '{}' is already used in another export." 1142 1143- name: ALREADY_EXPORTED 1144 id: 282 1145 message: "Cannot export '{}', it was already exported." 1146 1147- name: NAME_CANNOT_BE_EXPORTED_AND_TYPE_EXPORTED 1148 id: 283 1149 message: "Name '{}' cannot be exported and type exported at the same time." 1150 1151- name: DUPLICATE_PROTO_FIELDS 1152 id: 285 1153 message: "Duplicate __proto__ fields are not allowed in object literals" 1154 1155- name: INVALID_SHORTHAND_PROPERTY_INITIALIZER 1156 id: 286 1157 message: "Invalid shorthand property initializer." 1158 1159- name: RETURN_WITH_VALUE 1160 id: 287 1161 message: "Unexpected return value." 1162 1163- name: INVALID_INIT_IN_PACKAGE 1164 id: 288 1165 message: "Non-constant initializer of Package should be apply in Initializer Block." 1166 1167- name: PACKAGE_MULTIPLE_STATIC_BLOCK 1168 id: 289 1169 message: "static block cannot apply to multi-files for one package" 1170 1171- name: CONSTANT_MULTI_INITIALIZED_IN_STATIC_BLOCK 1172 id: 290 1173 message: "package constant property initialization can only be applied once in static block" 1174 1175- name: INVALID_PACKAGE_TOP_LEVEL_STMT 1176 id: 291 1177 message: "Invalid package toplevel statement" 1178 1179- name: ONLY_CONSTANT_ALLOWED 1180 id: 292 1181 message: "Only constant expression is expected in the field" 1182 1183- name: ENUM_OR_ANNOTATION_DIVIDE_BY_ZERO 1184 id: 293 1185 message: "Division by zero are not allowed in Enum or Annotation" 1186 1187- name: MISSING_INIT_FOR_CONST_PACKAGE_PROP 1188 id: 294 1189 message: "Missing initialization for const package property" 1190 1191- name: PREDEFINED_TYPE_AS_IDENTIFIER 1192 id: 295 1193 message: "{} is a predefined type, cannot be used as an identifier" 1194 1195- name: EXPORT_WITHOUT_DECLARE_IN_DECL_MODULE 1196 id: 296 1197 message: "Export keyword without declare shouldn't be used in declaration module." 1198 1199- name: ERROR_ARKTS_NO_VAR 1200 id: 297 1201 message: "'var' keyword is not supported. Use 'let' instead." 1202 1203- name: ERROR_ARKTS_NO_PRIVATE_IDENTIFIERS 1204 id: 298 1205 message: "Use 'private' keyword to declare an identifier as private." 1206 1207- name: ERROR_ARKTS_NO_DEBUGGER_STATEMENT 1208 id: 299 1209 message: "Debugger statement is not supported!" 1210 1211- name: MISSING_LOOP_BODY 1212 id: 300 1213 message: "Missing body in {} statement" 1214 1215- name: MISSING_LOOP_CONDITION 1216 id: 301 1217 message: "Missing condition in {} statement" 1218 1219- name: PRIVATE_FIELD_MISMATCH 1220 id: 302 1221 message: "Private field '{}' must be declared in an enclosing class" 1222 1223- name: STATIC_LATE_INITIALIZATION_FIELD_INVALID_MODIFIER 1224 id: 303 1225 message: "Late-initialized field cannot be defined as static." 1226 1227- name: LATE_INITIALIZATION_FIELD_HAS_DEFAULT_VALUE 1228 id: 304 1229 message: "Late-initialized field cannot have default value." 1230 1231- name: DEEP_NESTING 1232 id: 305 1233 message: "Maximum allowed nesting level exceeded." 1234 1235- name: FUNC_EXPR 1236 id: 306 1237 message: "Function expressions are not supported, use arrow functions instead" 1238 1239- name: DEFAULT_PARAM_IN_DECLARE 1240 id: 307 1241 message: "A parameter initializer is only allowed in a function or constructor implementation." 1242 1243- name: ERROR_ARKTS_NO_OBJ_LITERAL_TO_DECL_TYPE 1244 id: 308 1245 message: "Using object literals to declare types in place is not supported. Please declare types and interfaces explicitly!" 1246