1/* 2 * Copyright (c) 2022-2023 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 <= 150; i++) { 20 cookBookMsg[i] = ''; 21} 22 23cookBookTag[1] = 'Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)'; 24cookBookTag[2] = '"Symbol()" API is not supported (arkts-no-symbol)'; 25cookBookTag[3] = 'Private \'#\' identifiers are not supported (arkts-no-private-identifiers)'; 26cookBookTag[4] = 'Use unique names for types and namespaces. (arkts-unique-names)'; 27cookBookTag[5] = 'Use "let" instead of "var" (arkts-no-var)'; 28cookBookTag[6] = ''; 29cookBookTag[7] = ''; 30cookBookTag[8] = 'Use explicit types instead of "any", "unknown" (arkts-no-any-unknown)'; 31cookBookTag[9] = ''; 32cookBookTag[10] = ''; 33cookBookTag[11] = ''; 34cookBookTag[12] = ''; 35cookBookTag[13] = ''; 36cookBookTag[14] = 'Use "class" instead of a type with call signature (arkts-no-call-signatures)'; 37cookBookTag[15] = 'Use "class" instead of a type with constructor signature (arkts-no-ctor-signatures-type)'; 38cookBookTag[16] = 'Only one static block is supported (arkts-no-multiple-static-blocks)'; 39cookBookTag[17] = 'Indexed signatures are not supported (arkts-no-indexed-signatures)'; 40cookBookTag[18] = ''; 41cookBookTag[19] = 'Use inheritance instead of intersection types (arkts-no-intersection-types)'; 42cookBookTag[20] = ''; 43cookBookTag[21] = 'Type notation using "this" is not supported (arkts-no-typing-with-this)'; 44cookBookTag[22] = 'Conditional types are not supported (arkts-no-conditional-types)'; 45cookBookTag[23] = ''; 46cookBookTag[24] = ''; 47cookBookTag[25] = 'Declaring fields in "constructor" is not supported (arkts-no-ctor-prop-decls)'; 48cookBookTag[26] = ''; 49cookBookTag[27] = 'Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)'; 50cookBookTag[28] = 'Indexed access types are not supported (arkts-no-aliases-by-index)'; 51cookBookTag[29] = 'Indexed access is not supported for fields (arkts-no-props-by-index)'; 52cookBookTag[30] = 'Structural typing is not supported (arkts-no-structural-typing)'; 53cookBookTag[31] = ''; 54cookBookTag[32] = ''; 55cookBookTag[33] = ''; 56cookBookTag[34] = 'Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)'; 57cookBookTag[35] = ''; 58cookBookTag[36] = ''; 59cookBookTag[37] = 'RegExp literals are not supported (arkts-no-regexp-literals)'; 60cookBookTag[38] = 'Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)'; 61cookBookTag[39] = ''; 62cookBookTag[40] = 'Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)'; 63cookBookTag[41] = ''; 64cookBookTag[42] = ''; 65cookBookTag[43] = 'Array literals must contain elements of only inferrable types (arkts-no-noninferrable-arr-literals)'; 66cookBookTag[44] = ''; 67cookBookTag[45] = ''; 68cookBookTag[46] = 'Use arrow functions instead of function expressions (arkts-no-func-expressions)'; 69cookBookTag[47] = ''; 70cookBookTag[48] = ''; 71cookBookTag[49] = 'Use generic functions instead of generic arrow functions (arkts-no-generic-lambdas)'; 72cookBookTag[50] = 'Class literals are not supported (arkts-no-class-literals)'; 73cookBookTag[51] = 'Classes cannot be specified in "implements" clause (arkts-implements-only-iface)'; 74cookBookTag[52] = 'Reassigning object methods is not supported (arkts-no-method-reassignment)'; 75cookBookTag[53] = 'Only "as T" syntax is supported for type casts (arkts-as-casts)'; 76cookBookTag[54] = 'JSX expressions are not supported (arkts-no-jsx)'; 77cookBookTag[55] = 'Unary operators "+", "-" and "~" work only on numbers (arkts-no-polymorphic-unops)'; 78cookBookTag[56] = ''; 79cookBookTag[57] = ''; 80cookBookTag[58] = ''; 81cookBookTag[59] = '"delete" operator is not supported (arkts-no-delete)'; 82cookBookTag[60] = '"typeof" operator is allowed only in expression contexts (arkts-no-type-query)'; 83cookBookTag[61] = ''; 84cookBookTag[62] = ''; 85cookBookTag[63] = ''; 86cookBookTag[64] = ''; 87cookBookTag[65] = '"instanceof" operator is partially supported (arkts-instanceof-ref-types)'; 88cookBookTag[66] = '"in" operator is not supported (arkts-no-in)'; 89cookBookTag[67] = ''; 90cookBookTag[68] = ''; 91cookBookTag[69] = 'Destructuring assignment is not supported (arkts-no-destruct-assignment)'; 92cookBookTag[70] = ''; 93cookBookTag[71] = 'The comma operator "," is supported only in "for" loops (arkts-no-comma-outside-loops)'; 94cookBookTag[72] = ''; 95cookBookTag[73] = ''; 96cookBookTag[74] = 'Destructuring variable declarations are not supported (arkts-no-destruct-decls)'; 97cookBookTag[75] = ''; 98cookBookTag[76] = ''; 99cookBookTag[77] = ''; 100cookBookTag[78] = ''; 101cookBookTag[79] = 'Type annotation in catch clause is not supported (arkts-no-types-in-catch)'; 102cookBookTag[80] = '"for .. in" is not supported (arkts-no-for-in)'; 103cookBookTag[81] = ''; 104cookBookTag[82] = ''; 105cookBookTag[83] = 'Mapped type expression is not supported (arkts-no-mapped-types)'; 106cookBookTag[84] = '"with" statement is not supported (arkts-no-with)'; 107cookBookTag[85] = ''; 108cookBookTag[86] = ''; 109cookBookTag[87] = '"throw" statements cannot accept values of arbitrary types (arkts-limited-throw)'; 110cookBookTag[88] = ''; 111cookBookTag[89] = ''; 112cookBookTag[90] = 'Function return type inference is limited (arkts-no-implicit-return-types)'; 113cookBookTag[91] = 'Destructuring parameter declarations are not supported (arkts-no-destruct-params)'; 114cookBookTag[92] = 'Nested functions are not supported (arkts-no-nested-funcs)'; 115cookBookTag[93] = 'Using "this" inside stand-alone functions is not supported (arkts-no-standalone-this)'; 116cookBookTag[94] = 'Generator functions are not supported (arkts-no-generators)'; 117cookBookTag[95] = ''; 118cookBookTag[96] = 'Type guarding is supported with "instanceof" and "as" (arkts-no-is)'; 119cookBookTag[97] = ''; 120cookBookTag[98] = ''; 121cookBookTag[99] = 'It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)'; 122cookBookTag[100] = ''; 123cookBookTag[101] = ''; 124cookBookTag[102] = 'Interface can not extend interfaces with the same method (arkts-no-extend-same-prop)'; 125cookBookTag[103] = 'Declaration merging is not supported (arkts-no-decl-merging)'; 126cookBookTag[104] = 'Interfaces cannot extend classes (arkts-extends-only-class)'; 127cookBookTag[105] = ''; 128cookBookTag[106] = 'Constructor function type is not supported (arkts-no-ctor-signatures-funcs)'; 129cookBookTag[107] = ''; 130cookBookTag[108] = ''; 131cookBookTag[109] = ''; 132cookBookTag[110] = ''; 133cookBookTag[111] = 'Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)'; 134cookBookTag[112] = ''; 135cookBookTag[113] = '"enum" declaration merging is not supported (arkts-no-enum-merging)'; 136cookBookTag[114] = 'Namespaces cannot be used as objects (arkts-no-ns-as-obj)'; 137cookBookTag[115] = ''; 138cookBookTag[116] = 'Non-declaration statements in namespaces are not supported (arkts-no-ns-statements)'; 139cookBookTag[117] = ''; 140cookBookTag[118] = 'Special import type declarations are not supported (arkts-no-special-imports)'; 141cookBookTag[119] = 'Importing a module for side-effects only is not supported (arkts-no-side-effects-imports)'; 142cookBookTag[120] = '"import default as ..." is not supported (arkts-no-import-default-as)'; 143cookBookTag[121] = '"require" and "import" assignment are not supported (arkts-no-require)'; 144cookBookTag[122] = ''; 145cookBookTag[123] = ''; 146cookBookTag[124] = ''; 147cookBookTag[125] = ''; 148cookBookTag[126] = '"export = ..." assignment is not supported (arkts-no-export-assignment)'; 149cookBookTag[127] = 'Special "export type" declarations are not supported (arkts-no-special-exports)'; 150cookBookTag[128] = 'Ambient module declaration is not supported (arkts-no-ambient-decls)'; 151cookBookTag[129] = 'Wildcards in module names are not supported (arkts-no-module-wildcards)'; 152cookBookTag[130] = 'Universal module definitions (UMD) are not supported (arkts-no-umd)'; 153cookBookTag[131] = ''; 154cookBookTag[132] = '"new.target" is not supported (arkts-no-new-target)'; 155cookBookTag[133] = ''; 156cookBookTag[134] = 'Definite assignment assertions are not supported (arkts-no-definite-assignment)'; 157cookBookTag[135] = ''; 158cookBookTag[136] = 'Prototype assignment is not supported (arkts-no-prototype-assignment)'; 159cookBookTag[137] = '"globalThis" is not supported (arkts-no-globalthis)'; 160cookBookTag[138] = 'Some of utility types are not supported (arkts-no-utility-types)'; 161cookBookTag[139] = 'Declaring properties on functions is not supported (arkts-no-func-props)'; 162cookBookTag[140] = '"Function.apply", "Function.bind", "Function.call" are not supported (arkts-no-func-apply-bind-call)'; 163cookBookTag[141] = ''; 164cookBookTag[142] = '"as const" assertions are not supported (arkts-no-as-const)'; 165cookBookTag[143] = 'Import assertions are not supported (arkts-no-import-assertions)'; 166cookBookTag[144] = 'Usage of standard library is restricted (arkts-limited-stdlib)'; 167cookBookTag[145] = 'Strict type checking is enforced (arkts-strict-typing)'; 168cookBookTag[146] = 'Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)'; 169cookBookTag[147] = 'No dependencies on TypeScript code are currently allowed (arkts-no-ts-deps)'; 170cookBookTag[148] = 'No decorators except ArkUI decorators are currently allowed (arkts-no-decorators-except-arkui)'; 171cookBookTag[149] = 'Classes cannot be used as objects (arkts-no-classes-as-obj)'; 172cookBookTag[150] = '"import" statements after other statements are not allowed (arkts-no-misplaced-imports)'; 173cookBookTag[151] = 'Usage of "ESObject" type is restricted (arkts-limited-esobject)'; 174