1/* 2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export const cookBookMsg: string[] = []; 17export const cookBookTag: string[] = []; 18 19for (let i = 0; i <= 183; i++) { 20 cookBookMsg[i] = ''; 21} 22 23cookBookTag[1] = 24 'Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)'; 25cookBookTag[2] = '"Symbol()" API is not supported (arkts-no-symbol)'; 26cookBookTag[3] = 'Private \'#\' identifiers are not supported (arkts-no-private-identifiers)'; 27cookBookTag[4] = 'Use unique names for types and namespaces. (arkts-unique-names)'; 28cookBookTag[5] = 'Use "let" instead of "var" (arkts-no-var)'; 29cookBookTag[6] = ''; 30cookBookTag[7] = ''; 31cookBookTag[8] = 'Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)'; 32cookBookTag[9] = ''; 33cookBookTag[10] = ''; 34cookBookTag[11] = ''; 35cookBookTag[12] = ''; 36cookBookTag[13] = ''; 37cookBookTag[14] = 'Use "class" instead of a type with call signature (arkts-no-call-signatures)'; 38cookBookTag[15] = 'Use "class" instead of a type with constructor signature (arkts-no-ctor-signatures-type)'; 39cookBookTag[16] = 'Only one static block is supported (arkts-no-multiple-static-blocks)'; 40cookBookTag[17] = 'Indexed signatures are not supported (arkts-no-indexed-signatures)'; 41cookBookTag[18] = ''; 42cookBookTag[19] = 'Use inheritance instead of intersection types (arkts-no-intersection-types)'; 43cookBookTag[20] = ''; 44cookBookTag[21] = 'Type notation using "this" is not supported (arkts-no-typing-with-this)'; 45cookBookTag[22] = 'Conditional types are not supported (arkts-no-conditional-types)'; 46cookBookTag[23] = ''; 47cookBookTag[24] = ''; 48cookBookTag[25] = 'Declaring fields in "constructor" is not supported (arkts-no-ctor-prop-decls)'; 49cookBookTag[26] = ''; 50cookBookTag[27] = 'Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)'; 51cookBookTag[28] = 'Indexed access types are not supported (arkts-no-aliases-by-index)'; 52cookBookTag[29] = 'Indexed access is not supported for fields (arkts-no-props-by-index)'; 53cookBookTag[30] = 'Structural typing is not supported (arkts-no-structural-typing)'; 54cookBookTag[31] = ''; 55cookBookTag[32] = ''; 56cookBookTag[33] = ''; 57cookBookTag[34] = 'Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)'; 58cookBookTag[35] = ''; 59cookBookTag[36] = ''; 60cookBookTag[37] = ''; 61cookBookTag[38] = 62 'Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)'; 63cookBookTag[39] = ''; 64cookBookTag[40] = 'Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)'; 65cookBookTag[41] = ''; 66cookBookTag[42] = ''; 67cookBookTag[43] = 'Array literals must contain elements of only inferrable types (arkts-no-noninferrable-arr-literals)'; 68cookBookTag[44] = ''; 69cookBookTag[45] = ''; 70cookBookTag[46] = 'Use arrow functions instead of function expressions (arkts-no-func-expressions)'; 71cookBookTag[47] = ''; 72cookBookTag[48] = ''; 73cookBookTag[49] = ''; 74cookBookTag[50] = 'Class literals are not supported (arkts-no-class-literals)'; 75cookBookTag[51] = 'Classes cannot be specified in "implements" clause (arkts-implements-only-iface)'; 76cookBookTag[52] = 'Reassigning object methods is not supported (arkts-no-method-reassignment)'; 77cookBookTag[53] = 'Only "as T" syntax is supported for type casts (arkts-as-casts)'; 78cookBookTag[54] = 'JSX expressions are not supported (arkts-no-jsx)'; 79cookBookTag[55] = 'Unary operators "+", "-" and "~" work only on numbers (arkts-no-polymorphic-unops)'; 80cookBookTag[56] = ''; 81cookBookTag[57] = ''; 82cookBookTag[58] = ''; 83cookBookTag[59] = '"delete" operator is not supported (arkts-no-delete)'; 84cookBookTag[60] = '"typeof" operator is allowed only in expression contexts (arkts-no-type-query)'; 85cookBookTag[61] = ''; 86cookBookTag[62] = ''; 87cookBookTag[63] = ''; 88cookBookTag[64] = ''; 89cookBookTag[65] = '"instanceof" operator is partially supported (arkts-instanceof-ref-types)'; 90cookBookTag[66] = '"in" operator is not supported (arkts-no-in)'; 91cookBookTag[67] = ''; 92cookBookTag[68] = ''; 93cookBookTag[69] = 'Destructuring assignment is not supported (arkts-no-destruct-assignment)'; 94cookBookTag[70] = ''; 95cookBookTag[71] = 'The comma operator "," is supported only in "for" loops (arkts-no-comma-outside-loops)'; 96cookBookTag[72] = ''; 97cookBookTag[73] = ''; 98cookBookTag[74] = 'Destructuring variable declarations are not supported (arkts-no-destruct-decls)'; 99cookBookTag[75] = ''; 100cookBookTag[76] = ''; 101cookBookTag[77] = ''; 102cookBookTag[78] = ''; 103cookBookTag[79] = 'Type annotation in catch clause is not supported (arkts-no-types-in-catch)'; 104cookBookTag[80] = '"for .. in" is not supported (arkts-no-for-in)'; 105cookBookTag[81] = ''; 106cookBookTag[82] = ''; 107cookBookTag[83] = 'Mapped type expression is not supported (arkts-no-mapped-types)'; 108cookBookTag[84] = '"with" statement is not supported (arkts-no-with)'; 109cookBookTag[85] = ''; 110cookBookTag[86] = ''; 111cookBookTag[87] = '"throw" statements cannot accept values of arbitrary types (arkts-limited-throw)'; 112cookBookTag[88] = ''; 113cookBookTag[89] = ''; 114cookBookTag[90] = 'Function return type inference is limited (arkts-no-implicit-return-types)'; 115cookBookTag[91] = 'Destructuring parameter declarations are not supported (arkts-no-destruct-params)'; 116cookBookTag[92] = 'Nested functions are not supported (arkts-no-nested-funcs)'; 117cookBookTag[93] = 'Using "this" inside stand-alone functions is not supported (arkts-no-standalone-this)'; 118cookBookTag[94] = 'Generator functions are not supported (arkts-no-generators)'; 119cookBookTag[95] = ''; 120cookBookTag[96] = 'Type guarding is supported with "instanceof" and "as" (arkts-no-is)'; 121cookBookTag[97] = ''; 122cookBookTag[98] = ''; 123cookBookTag[99] = 124 'It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)'; 125cookBookTag[100] = ''; 126cookBookTag[101] = ''; 127cookBookTag[102] = 'Interface can not extend interfaces with the same method (arkts-no-extend-same-prop)'; 128cookBookTag[103] = 'Declaration merging is not supported (arkts-no-decl-merging)'; 129cookBookTag[104] = 'Interfaces cannot extend classes (arkts-extends-only-class)'; 130cookBookTag[105] = ''; 131cookBookTag[106] = 'Constructor function type is not supported (arkts-no-ctor-signatures-funcs)'; 132cookBookTag[107] = ''; 133cookBookTag[108] = ''; 134cookBookTag[109] = ''; 135cookBookTag[110] = ''; 136cookBookTag[111] = 137 'Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)'; 138cookBookTag[112] = ''; 139cookBookTag[113] = '"enum" declaration merging is not supported (arkts-no-enum-merging)'; 140cookBookTag[114] = 'Namespaces cannot be used as objects (arkts-no-ns-as-obj)'; 141cookBookTag[115] = ''; 142cookBookTag[116] = 143 'Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)'; 144cookBookTag[117] = ''; 145cookBookTag[118] = ''; 146cookBookTag[119] = ''; 147cookBookTag[120] = ''; 148cookBookTag[121] = '"require" and "import" assignment are not supported (arkts-no-require)'; 149cookBookTag[122] = ''; 150cookBookTag[123] = ''; 151cookBookTag[124] = ''; 152cookBookTag[125] = ''; 153cookBookTag[126] = '"export = ..." assignment is not supported (arkts-no-export-assignment)'; 154cookBookTag[127] = ''; 155cookBookTag[128] = 'Ambient module declaration is not supported (arkts-no-ambient-decls)'; 156cookBookTag[129] = 'Wildcards in module names are not supported (arkts-no-module-wildcards)'; 157cookBookTag[130] = 'Universal module definitions (UMD) are not supported (arkts-no-umd)'; 158cookBookTag[131] = ''; 159cookBookTag[132] = '"new.target" is not supported (arkts-no-new-target)'; 160cookBookTag[133] = ''; 161cookBookTag[134] = 'Definite assignment assertions are not supported (arkts-no-definite-assignment)'; 162cookBookTag[135] = ''; 163cookBookTag[136] = 'Prototype assignment is not supported (arkts-no-prototype-assignment)'; 164cookBookTag[137] = '"globalThis" is not supported (arkts-no-globalthis)'; 165cookBookTag[138] = 'Some of utility types are not supported (arkts-no-utility-types)'; 166cookBookTag[139] = 'Declaring properties on functions is not supported (arkts-no-func-props)'; 167cookBookTag[140] = '"Function.bind" is not supported (arkts-no-func-bind)'; 168cookBookTag[141] = ''; 169cookBookTag[142] = '"as const" assertions are not supported (arkts-no-as-const)'; 170cookBookTag[143] = 'Import assertions are not supported (arkts-no-import-assertions)'; 171cookBookTag[144] = 'Usage of standard library is restricted (arkts-limited-stdlib)'; 172cookBookTag[145] = 'Strict type checking is enforced (arkts-strict-typing)'; 173cookBookTag[146] = 'Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)'; 174cookBookTag[147] = 'No dependencies on TypeScript code are currently allowed (arkts-no-ts-deps)'; 175cookBookTag[148] = ''; 176cookBookTag[149] = 'Classes cannot be used as objects (arkts-no-classes-as-obj)'; 177cookBookTag[150] = '"import" statements after other statements are not allowed (arkts-no-misplaced-imports)'; 178cookBookTag[151] = 'Usage of "ESObject" type is restricted (arkts-limited-esobj)'; 179cookBookTag[152] = '"Function.apply", "Function.call" are not supported (arkts-no-func-apply-call)'; 180cookBookTag[153] = 'The inheritance for "Sendable" classes is limited (arkts-sendable-class-inheritance)'; 181cookBookTag[154] = 182 'Properties in "Sendable" classes and interfaces must have a Sendable data type (arkts-sendable-prop-types)'; 183cookBookTag[155] = 184 'Definite assignment assertion in not allowed in "Sendable" classes (arkts-sendable-definite-assignment)'; 185cookBookTag[156] = 186 'Type arguments of generic "Sendable" type must be a "Sendable" data type (arkts-sendable-generic-types)'; 187cookBookTag[157] = 'Only imported variables can be captured by "Sendable" class (arkts-sendable-imported-variables)'; 188cookBookTag[158] = 'Only "@Sendable" decorator can be used on "Sendable" class (arkts-sendable-class-decorator)'; 189cookBookTag[159] = 190 'Objects of "Sendable" type can not be initialized using object literal or array literal (arkts-sendable-obj-init)'; 191cookBookTag[160] = 192 'Computed property names are not allowed in "Sendable" classes and interfaces (arkts-sendable-computed-prop-name)'; 193cookBookTag[161] = 'Casting "Non-sendable" data to "Sendable" type is not allowed (arkts-sendable-as-expr)'; 194cookBookTag[162] = 195 'Importing a module for side-effects only is not supported in shared module (arkts-no-side-effects-imports)'; 196cookBookTag[163] = 'Only "Sendable" entities can be exported in shared module (arkts-shared-module-exports)'; 197cookBookTag[164] = '"export * from ..." is not allowed in shared module (arkts-shared-module-no-wildcard-export)'; 198cookBookTag[165] = 199 'Only "Sendable" classes and "Sendable" interfaces are allowed for importing from ets into ts file (arkts-no-ts-import-ets)'; 200cookBookTag[166] = 201 'In ts files, "Sendable" types cannot be used in implements and extends clauses (arkts-no-ts-sendable-type-inheritance)'; 202cookBookTag[167] = 203 'In sdk ts files, "Sendable" class and "Sendable" interface can not be exported (arkts-no-dts-sendable-type-export)'; 204cookBookTag[168] = 'In ts files, entities from ets files can not be re-exported (arkts-no-ts-re-export-ets)'; 205cookBookTag[169] = 206 'Namespace import are nbot allowed for importing from ets to ts file (arkts-no-namespace-import-in-ts-import-ets)'; 207cookBookTag[170] = 208 'Side effect import are not allowed for importing from ets to ts file (arkts-no-side-effect-import-in-ts-import-ets)'; 209cookBookTag[171] = 'Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)'; 210cookBookTag[172] = 211 'Only imported variables can be captured by "Sendable" function (arkts-sendable-function-imported-variables)'; 212cookBookTag[173] = 'Only "@Sendable" decorator can be used on "Sendable" function (arkts-sendable-function-decorator)'; 213cookBookTag[174] = 214 'Only "@Sendable" decorator can be used on "Sendable" typeAlias (arkts-sendable-typeAlias-decorator)'; 215cookBookTag[175] = 'Only "FunctionType" can declare "Sendable" typeAlias (arkts-sendable-typeAlias-declaration)'; 216cookBookTag[176] = 217 'Only "Sendable" function or "Sendable" typeAlias object can be assigned to "Sendable" typeAlias (arkts-sendable-function-assignment)'; 218cookBookTag[177] = 219 'When declaring "@Sendable" overloaded function, needs to add "@Sendable" decorator on each function (arkts-sendable-function-overload-decorator)'; 220cookBookTag[178] = 'The property of "Sendable" function is limited (arkts-sendable-function-property)'; 221cookBookTag[179] = 222 'Casting "Non-sendable" function to "Sendable" typeAlias is not allowed (arkts-sendable-function-as-expr)'; 223cookBookTag[180] = 224 'The "@Sendable" decorator can only be used on "class", "function", "typeAlias" (arkts-sendable-decorator-limited)'; 225cookBookTag[181] = 226 'The exported "Sendable" class or function cannot be captured by "Sendable" class or function in current file (arkts-sendable-closure-export)'; 227cookBookTag[182] = 228 'Sendable functions and sendable typealias are not available when compatibleSdkVersionStage is lowering than beta3 of API12 (arkts-sendable-beta-compatible)'; 229cookBookTag[183] = 'Object literal properties can only contain name-value pairs (arkts-obj-literal-props)'; 230cookBookTag[184] = 'Optional methods are not supported (arkts-optional-methods)'; 231cookBookTag[185] = 'syntax for import type is disabled (arkts-import-types)'; 232cookBookTag[186] = '"new" expression with dynamic constructor type is not supported (arkts-no-dynamic-ctor-call)'; 233