• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <= 171; 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] =
45  'Type notation using "this" is only supported for methods, that return "this" explicitly (arkts-this-typing)';
46cookBookTag[22] = 'Conditional types are not supported (arkts-no-conditional-types)';
47cookBookTag[23] = '';
48cookBookTag[24] = '';
49cookBookTag[25] = 'Declaring fields in "constructor" is not supported (arkts-no-ctor-prop-decls)';
50cookBookTag[26] = '';
51cookBookTag[27] = 'Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)';
52cookBookTag[28] = 'Indexed access types are not supported (arkts-no-aliases-by-index)';
53cookBookTag[29] = 'Indexed access is not supported for fields (arkts-no-props-by-index)';
54cookBookTag[30] = 'Structural typing is not supported (arkts-no-structural-typing)';
55cookBookTag[31] = '';
56cookBookTag[32] = '';
57cookBookTag[33] = '';
58cookBookTag[34] = 'Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)';
59cookBookTag[35] = '';
60cookBookTag[36] = '';
61cookBookTag[37] = '';
62cookBookTag[38] =
63  'Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)';
64cookBookTag[39] = '';
65cookBookTag[40] = 'Object literals cannot be used as type declarations (arkts-no-obj-literals-as-types)';
66cookBookTag[41] = '';
67cookBookTag[42] = '';
68cookBookTag[43] = 'Array literals must contain elements of only inferrable types (arkts-no-noninferrable-arr-literals)';
69cookBookTag[44] = '';
70cookBookTag[45] = '';
71cookBookTag[46] = 'Use arrow functions instead of function expressions (arkts-no-func-expressions)';
72cookBookTag[47] = '';
73cookBookTag[48] = '';
74cookBookTag[49] = '';
75cookBookTag[50] = 'Class literals are not supported (arkts-no-class-literals)';
76cookBookTag[51] = 'Classes cannot be specified in "implements" clause (arkts-implements-only-iface)';
77cookBookTag[52] = 'Reassigning object methods is not supported (arkts-no-method-reassignment)';
78cookBookTag[53] = 'Only "as T" syntax is supported for type casts (arkts-as-casts)';
79cookBookTag[54] = 'JSX expressions are not supported (arkts-no-jsx)';
80cookBookTag[55] = 'Unary operators "+", "-" and "~" work only on numbers (arkts-no-polymorphic-unops)';
81cookBookTag[56] = '';
82cookBookTag[57] = '';
83cookBookTag[58] = '';
84cookBookTag[59] = '"delete" operator is not supported (arkts-no-delete)';
85cookBookTag[60] = '"typeof" operator is allowed only in expression contexts (arkts-no-type-query)';
86cookBookTag[61] = '';
87cookBookTag[62] = '';
88cookBookTag[63] = '';
89cookBookTag[64] = '';
90cookBookTag[65] = '"instanceof" operator is partially supported (arkts-instanceof-ref-types)';
91cookBookTag[66] = '"in" operator is not supported (arkts-no-in)';
92cookBookTag[67] = '';
93cookBookTag[68] = '';
94cookBookTag[69] = 'Destructuring assignment is not supported (arkts-no-destruct-assignment)';
95cookBookTag[70] = '';
96cookBookTag[71] = 'The comma operator "," is supported only in "for" loops (arkts-no-comma-outside-loops)';
97cookBookTag[72] = '';
98cookBookTag[73] = '';
99cookBookTag[74] = 'Destructuring variable declarations are not supported (arkts-no-destruct-decls)';
100cookBookTag[75] = '';
101cookBookTag[76] = '';
102cookBookTag[77] = '';
103cookBookTag[78] = '';
104cookBookTag[79] = 'Type annotation in catch clause is not supported (arkts-no-types-in-catch)';
105cookBookTag[80] = '"for .. in" is not supported (arkts-no-for-in)';
106cookBookTag[81] = '';
107cookBookTag[82] = '';
108cookBookTag[83] = 'Mapped type expression is not supported (arkts-no-mapped-types)';
109cookBookTag[84] = '"with" statement is not supported (arkts-no-with)';
110cookBookTag[85] = '';
111cookBookTag[86] = '';
112cookBookTag[87] = '"throw" statements cannot accept values of arbitrary types (arkts-limited-throw)';
113cookBookTag[88] = '';
114cookBookTag[89] = '';
115cookBookTag[90] = 'Function return type inference is limited (arkts-no-implicit-return-types)';
116cookBookTag[91] = 'Destructuring parameter declarations are not supported (arkts-no-destruct-params)';
117cookBookTag[92] = 'Nested functions are not supported (arkts-no-nested-funcs)';
118cookBookTag[93] = 'Using "this" inside stand-alone functions is not supported (arkts-no-standalone-this)';
119cookBookTag[94] = 'Generator functions are not supported (arkts-no-generators)';
120cookBookTag[95] = '';
121cookBookTag[96] = 'Type guarding is supported with "instanceof" and "as" (arkts-no-is)';
122cookBookTag[97] = '';
123cookBookTag[98] = '';
124cookBookTag[99] =
125  'It is possible to spread only arrays or classes derived from arrays into the rest parameter or array literals (arkts-no-spread)';
126cookBookTag[100] = '';
127cookBookTag[101] = '';
128cookBookTag[102] = 'Interface can not extend interfaces with the same method (arkts-no-extend-same-prop)';
129cookBookTag[103] = 'Declaration merging is not supported (arkts-no-decl-merging)';
130cookBookTag[104] = 'Interfaces cannot extend classes (arkts-extends-only-class)';
131cookBookTag[105] = '';
132cookBookTag[106] = 'Constructor function type is not supported (arkts-no-ctor-signatures-funcs)';
133cookBookTag[107] = '';
134cookBookTag[108] = '';
135cookBookTag[109] = '';
136cookBookTag[110] = '';
137cookBookTag[111] =
138  'Enumeration members can be initialized only with compile time expressions of the same type (arkts-no-enum-mixed-types)';
139cookBookTag[112] = '';
140cookBookTag[113] = '"enum" declaration merging is not supported (arkts-no-enum-merging)';
141cookBookTag[114] = 'Namespaces cannot be used as objects (arkts-no-ns-as-obj)';
142cookBookTag[115] = '';
143cookBookTag[116] =
144  'Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)';
145cookBookTag[117] = '';
146cookBookTag[118] = '';
147cookBookTag[119] = '';
148cookBookTag[120] = '';
149cookBookTag[121] = '"require" and "import" assignment are not supported (arkts-no-require)';
150cookBookTag[122] = '';
151cookBookTag[123] = '';
152cookBookTag[124] = '';
153cookBookTag[125] = '';
154cookBookTag[126] = '"export = ..." assignment is not supported (arkts-no-export-assignment)';
155cookBookTag[127] = '';
156cookBookTag[128] = 'Ambient module declaration is not supported (arkts-no-ambient-decls)';
157cookBookTag[129] = 'Wildcards in module names are not supported (arkts-no-module-wildcards)';
158cookBookTag[130] = 'Universal module definitions (UMD) are not supported (arkts-no-umd)';
159cookBookTag[131] = '';
160cookBookTag[132] = '"new.target" is not supported (arkts-no-new-target)';
161cookBookTag[133] = '';
162cookBookTag[134] = 'Definite assignment assertions are not supported (arkts-no-definite-assignment)';
163cookBookTag[135] = '';
164cookBookTag[136] = 'Prototype assignment is not supported (arkts-no-prototype-assignment)';
165cookBookTag[137] = '"globalThis" is not supported (arkts-no-globalthis)';
166cookBookTag[138] = 'Some of utility types are not supported (arkts-no-utility-types)';
167cookBookTag[139] = 'Declaring properties on functions is not supported (arkts-no-func-props)';
168cookBookTag[140] = '"Function.bind" is not supported (arkts-no-func-bind)';
169cookBookTag[141] = '';
170cookBookTag[142] = '"as const" assertions are not supported (arkts-no-as-const)';
171cookBookTag[143] = 'Import assertions are not supported (arkts-no-import-assertions)';
172cookBookTag[144] = 'Usage of standard library is restricted (arkts-limited-stdlib)';
173cookBookTag[145] = 'Strict type checking is enforced (arkts-strict-typing)';
174cookBookTag[146] = 'Switching off type checks with in-place comments is not allowed (arkts-strict-typing-required)';
175cookBookTag[147] = 'No dependencies on TypeScript code are currently allowed (arkts-no-ts-deps)';
176cookBookTag[148] = '';
177cookBookTag[149] = 'Classes cannot be used as objects (arkts-no-classes-as-obj)';
178cookBookTag[150] = '"import" statements after other statements are not allowed (arkts-no-misplaced-imports)';
179cookBookTag[151] = 'Usage of "ESObject" type is restricted (arkts-limited-esobj)';
180cookBookTag[152] = '"Function.apply", "Function.call" are not supported (arkts-no-func-apply-call)';
181cookBookTag[153] = 'The inheritance for "Sendable" classes is limited (arkts-sendable-class-inheritance)';
182cookBookTag[154] =
183  'Properties in "Sendable" classes and interfaces must have a Sendable data type (arkts-sendable-prop-types)';
184cookBookTag[155] =
185  'Definite assignment assertion in not allowed in "Sendable" classes (arkts-sendable-definite-assignment)';
186cookBookTag[156] =
187  'Type arguments of generic "Sendable" type must be a "Sendable" data type (arkts-sendable-generic-types)';
188cookBookTag[157] = 'Only imported variables can be captured by "Sendable" class (arkts-sendable-imported-variables)';
189cookBookTag[158] = 'Only "@Sendable" decorator can be used on "Sendable" class (arkts-sendable-class-decorator)';
190cookBookTag[159] =
191  'Objects of "Sendable" type can not be initialized using object literal or array literal (arkts-sendable-obj-init)';
192cookBookTag[160] =
193  'Computed property names are not allowed in "Sendable" classes and interfaces (arkts-sendable-computed-prop-name)';
194cookBookTag[161] = 'Casting "Non-sendable" data to "Sendable" type is not allowed (arkts-sendable-as-expr)';
195cookBookTag[162] =
196  'Importing a module for side-effects only is not supported in shared module (arkts-no-side-effects-imports)';
197cookBookTag[163] = 'Only "Sendable" entities can be exported in shared module (arkts-shared-module-exports)';
198cookBookTag[164] = '"export * from ..." is not allowed in shared module (arkts-shared-module-no-wildcard-export)';
199cookBookTag[165] =
200  'Only "Sendable" classes and "Sendable" interfaces are allowed for importing from ets into ts file (arkts-no-ts-import-ets)';
201cookBookTag[166] =
202  'In ts files, "Sendable" types cannot be used in implements and extends clauses (arkts-no-ts-sendable-type-inheritance)';
203cookBookTag[167] =
204  'In sdk ts files, "Sendable" class and "Sendable" interface can not be exported (arkts-no-dts-sendable-type-export)';
205cookBookTag[168] = 'In ts files, entities from ets files can not be re-exported (arkts-no-ts-re-export-ets)';
206cookBookTag[169] =
207  'Namespace import are nbot allowed for importing from ets to ts file (arkts-no-namespace-import-in-ts-import-ets)';
208cookBookTag[170] =
209  'Side effect import are not allowed for importing from ets to ts file (arkts-no-side-effect-import-in-ts-import-ets)';
210cookBookTag[171] = 'Field in sendable class must have type annotation (arkts-sendable-explicit-field-type)';
211cookBookTag[172] =
212  'Only imported variables can be captured by "Sendable" function (arkts-sendable-function-imported-variables)';
213cookBookTag[173] = 'Only "@Sendable" decorator can be used on "Sendable" function (arkts-sendable-function-decorator)';
214cookBookTag[174] =
215  'Only "@Sendable" decorator can be used on "Sendable" typeAlias (arkts-sendable-typeAlias-decorator)';
216cookBookTag[175] = 'Only "FunctionType" can declare "Sendable" typeAlias (arkts-sendable-typeAlias-declaration)';
217cookBookTag[176] =
218  'Only "Sendable" function or "Sendable" typeAlias object can be assigned to "Sendable" typeAlias (arkts-sendable-function-assignment)';
219cookBookTag[177] =
220  'When declaring "@Sendable" overloaded function, needs to add "@Sendable" decorator on each function (arkts-sendable-function-overload-decorator)';
221cookBookTag[178] = 'The property of "Sendable" function is limited (arkts-sendable-function-property)';
222cookBookTag[179] =
223  'Casting "Non-sendable" function to "Sendable" typeAlias is not allowed (arkts-sendable-function-as-expr)';
224cookBookTag[180] =
225  'The "@Sendable" decorator can only be used on "class", "function", "typeAlias" (arkts-sendable-decorator-limited)';
226