/* * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ export const arkts2Rules: number[] = [ 1, 25, 30, 34, 37, 29, 111, 134, 137, 139, 140, 144, 149, 183, 184, 189, 190, 191, 192, 193, 198, 199, 202, 203, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 222, 232, 233, 234, 235, 236, 237, 238, 239, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 267, 268, 269, 270, 274, 275, 281, 282, 283, 284, 285, 286, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 355, 356, 357, 358, 359, 370, 371, 372, 373, 374, 375, 376, 377, 378, 381, 382 ]; export const onlyArkts2SyntaxRules: Map = new Map([ [1, 'arkts-identifiers-as-prop-names'], [25, 'arkts-no-ctor-prop-decls'], [29, 'arkts-no-props-by-index'], [30, 'arkts-no-structural-typing'], [34, 'arkts-no-inferred-generic-params'], [37, 'arkts-no-regexp-literals'], [111, 'arkts-no-enum-mixed-types'], [137, 'arkts-no-globalthis'], [139, 'arkts-no-func-props'], [140, 'arkts-no-func-bind'], [141, 'arkts-limited-stdlib'], [149, 'arkts-no-classes-as-obj'], [183, 'arkts-obj-literal-props'], [184, 'arkts-optional-methods'], [189, 'arkts-numeric-semantic'], [190, 'arkts-incompatible-function-types'], [191, 'arkts-no-need-stdlib-ason'], [192, 'arkts-limited-void-type'], [193, 'arkts-no-void-operator'], [198, 'arkts-no-ts-overload'], [202, 'arkts-limited-literal-types'], [203, 'arkts-no-exponent-op'], [207, 'arkts-no-arguments-obj'], [208, 'arkts-no-tagged-templates'], [209, 'arkts-array-index-expr-type'], [210, 'arkts-switch-expr'], [211, 'arkts-case-expr'], [212, 'arkts-array-index-negative'], [222, 'arkts-no-side-effect-import'], [232, 'arkts-no-lazy-import'], [233, 'arkts-no-dynamic-import'], [234, 'arkts-no-ts-decorators'], [235, 'arkts-common-union-member-access'], [236, 'arkts-no-method-overriding-field'], [237, 'arkts-no-tuples-arrays'], [238, 'arkts-class-static-initialization'], [239, 'arkts-invalid-identifier'], [255, 'arkts-no-extends-expression'], [300, 'arkts-no-ts-like-function-call'], [301, 'arkts-ohmurl-full-path'], [304, 'arkts-no-duplicate-function-name'], [319, 'arkts-method-inherit-rule'], [325, 'arkts-default-args-behind-required-args'], [329, 'arkts-unsupport-prop-name-from-value'], [370, 'arkts-no-sparse-array'], [371, 'arkts-no-enum-prop-as-type'], [372, 'arkts-no-ts-like-smart-type'], [373, 'arkts-array-type-immutable'], [374, 'arkts-primitive-type-normalization'], [375, 'arkts-no-ts-like-catch-type'], [376, 'arkts-numeric-bigint-compare'], [377, 'arkts-only-support-decimal-bigint-literal'], [378, 'arkts-unsupport-operator'] ]);