/* * Copyright (c) 2023-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. */ import { FaultID } from './Problems'; export const faultDesc: string[] = []; faultDesc[FaultID.AnyType] = '"any" type'; faultDesc[FaultID.SymbolType] = '"symbol" type'; faultDesc[FaultID.ObjectLiteralNoContextType] = 'Object literals with no context Class or Interface type'; faultDesc[FaultID.ArrayLiteralNoContextType] = 'Array literals with no context Array type'; faultDesc[FaultID.ComputedPropertyName] = 'Computed properties'; faultDesc[FaultID.LiteralAsPropertyName] = 'String or integer literal as property name'; faultDesc[FaultID.TypeQuery] = '"typeof" operations'; faultDesc[FaultID.IsOperator] = '"is" operations'; faultDesc[FaultID.DestructuringParameter] = 'destructuring parameters'; faultDesc[FaultID.YieldExpression] = '"yield" operations'; faultDesc[FaultID.InterfaceMerging] = 'merging interfaces'; faultDesc[FaultID.EnumMerging] = 'merging enums'; faultDesc[FaultID.InterfaceExtendsClass] = 'interfaces inherited from classes'; faultDesc[FaultID.IndexMember] = 'index members'; faultDesc[FaultID.WithStatement] = '"with" statements'; faultDesc[FaultID.ThrowStatement] = '"throw" statements with expression of wrong type'; faultDesc[FaultID.IndexedAccessType] = 'Indexed access type'; faultDesc[FaultID.UnknownType] = '"unknown" type'; faultDesc[FaultID.ForInStatement] = '"for-In" statements'; faultDesc[FaultID.InOperator] = '"in" operations'; faultDesc[FaultID.FunctionExpression] = 'function expressions'; faultDesc[FaultID.IntersectionType] = 'intersection types and type literals'; faultDesc[FaultID.ObjectTypeLiteral] = 'Object type literals'; faultDesc[FaultID.CommaOperator] = 'comma operator'; faultDesc[FaultID.LimitedReturnTypeInference] = 'Functions with limited return type inference'; faultDesc[FaultID.ClassExpression] = 'Class expressions'; faultDesc[FaultID.DestructuringAssignment] = 'Destructuring assignments'; faultDesc[FaultID.DestructuringDeclaration] = 'Destructuring variable declarations'; faultDesc[FaultID.VarDeclaration] = '"var" declarations'; faultDesc[FaultID.CatchWithUnsupportedType] = '"catch" clause with unsupported exception type'; faultDesc[FaultID.DeleteOperator] = '"delete" operations'; faultDesc[FaultID.DeclWithDuplicateName] = 'Declarations with duplicate name'; faultDesc[FaultID.UnaryArithmNotNumber] = 'Unary arithmetics with not-numeric values'; faultDesc[FaultID.ConstructorType] = 'Constructor type'; faultDesc[FaultID.ConstructorFuncs] = 'Constructor function type is not supported'; faultDesc[FaultID.ConstructorIface] = 'Construct signatures are not supported in interfaces'; faultDesc[FaultID.CallSignature] = 'Call signatures'; faultDesc[FaultID.TypeAssertion] = 'Type assertion expressions'; faultDesc[FaultID.PrivateIdentifier] = 'Private identifiers (with "#" prefix)'; faultDesc[FaultID.LocalFunction] = 'Local function declarations'; faultDesc[FaultID.ConditionalType] = 'Conditional type'; faultDesc[FaultID.MappedType] = 'Mapped type'; faultDesc[FaultID.NamespaceAsObject] = 'Namespaces used as objects'; faultDesc[FaultID.ClassAsObject] = faultDesc[FaultID.ClassAsObjectError] = 'Class used as object'; faultDesc[FaultID.NonDeclarationInNamespace] = 'Non-declaration statements in namespaces'; faultDesc[FaultID.GeneratorFunction] = 'Generator functions'; faultDesc[FaultID.FunctionContainsThis] = 'Functions containing "this"'; faultDesc[FaultID.PropertyAccessByIndex] = 'property access by index'; faultDesc[FaultID.NoStaticOnClass] = 'No static blocks on classes'; faultDesc[FaultID.NoConstructorOnClass] = 'No constructor field on object'; faultDesc[FaultID.RuntimeArrayCheck] = 'Array bound not checked'; faultDesc[FaultID.JsxElement] = 'JSX Elements'; faultDesc[FaultID.EnumMemberNonConstInit] = 'Enum members with non-constant initializer'; faultDesc[FaultID.ImplementsClass] = 'Class type mentioned in "implements" clause'; faultDesc[FaultID.MethodReassignment] = 'Access to undefined field'; faultDesc[FaultID.MultipleStaticBlocks] = 'Multiple static blocks'; faultDesc[FaultID.ThisType] = '"this" type'; faultDesc[FaultID.IntefaceExtendDifProps] = 'Extends same properties with different types'; faultDesc[FaultID.StructuralIdentity] = 'Use of type structural identity'; faultDesc[FaultID.ExportAssignment] = 'Export assignments (export = ..)'; faultDesc[FaultID.ImportAssignment] = 'Import assignments (import = ..)'; faultDesc[FaultID.GenericCallNoTypeArgs] = 'Generic calls without type arguments'; faultDesc[FaultID.ParameterProperties] = 'Parameter properties in constructor'; faultDesc[FaultID.InstanceofUnsupported] = 'Left-hand side of "instanceof" is wrong'; faultDesc[FaultID.ShorthandAmbientModuleDecl] = 'Shorthand ambient module declaration'; faultDesc[FaultID.WildcardsInModuleName] = 'Wildcards in module name'; faultDesc[FaultID.UMDModuleDefinition] = 'UMD module definition'; faultDesc[FaultID.NewTarget] = '"new.target" meta-property'; faultDesc[FaultID.DefiniteAssignment] = faultDesc[FaultID.DefiniteAssignmentError] = 'Definite assignment assertion'; faultDesc[FaultID.Prototype] = 'Prototype assignment'; faultDesc[FaultID.GlobalThis] = faultDesc[FaultID.GlobalThisError] = 'Use of globalThis'; faultDesc[FaultID.UtilityType] = 'Standard Utility types'; faultDesc[FaultID.PropertyDeclOnFunction] = 'Property declaration on function'; faultDesc[FaultID.FunctionApplyCall] = 'Invoking methods of function objects'; faultDesc[FaultID.FunctionBind] = faultDesc[FaultID.FunctionBindError] = 'Invoking methods of function objects'; faultDesc[FaultID.ConstAssertion] = '"as const" assertion'; faultDesc[FaultID.ImportAssertion] = 'Import assertion'; faultDesc[FaultID.SpreadOperator] = 'Spread operation'; faultDesc[FaultID.LimitedStdLibApi] = 'Limited standard library API'; faultDesc[FaultID.LimitedStdLibNoASON] = 'Cannot find symbol ASON.'; faultDesc[FaultID.NoNeedStdLibSendableContainer] = 'Sendable Containers not supported'; faultDesc[FaultID.ErrorSuppression] = 'Error suppression annotation'; faultDesc[FaultID.StrictDiagnostic] = 'Strict diagnostic'; faultDesc[FaultID.ImportAfterStatement] = 'Import declaration after other declaration or statement'; faultDesc[FaultID.EsValueType] = faultDesc[FaultID.EsValueTypeError] = 'Restricted "ESValue" type'; faultDesc[FaultID.SendableClassInheritance] = 'Sendable class inheritance'; faultDesc[FaultID.SendablePropType] = 'Sendable class property'; faultDesc[FaultID.SendableDefiniteAssignment] = 'Use of definite assignment assertion in "Sendable" class'; faultDesc[FaultID.SendableGenericTypes] = 'Sendable generic types'; faultDesc[FaultID.SendableCapturedVars] = 'Sendable class captured variables'; faultDesc[FaultID.SendableClassDecorator] = 'Sendable class decorator'; faultDesc[FaultID.SendableObjectInitialization] = 'Object literal or array literal is not allowed to initialize a "Sendable" object'; faultDesc[FaultID.SendableComputedPropName] = 'Sendable computed property name'; faultDesc[FaultID.SendableAsExpr] = 'Sendable as expr'; faultDesc[FaultID.SharedNoSideEffectImport] = 'Shared no side effect import'; faultDesc[FaultID.SharedModuleExports] = 'Shared module exports'; faultDesc[FaultID.SharedModuleNoWildcardExport] = 'Share module no wildcard export'; faultDesc[FaultID.NoTsImportEts] = 'No ts Import Ets'; faultDesc[FaultID.SendableTypeInheritance] = 'Sendable type inheritance'; faultDesc[FaultID.SendableTypeExported] = 'Sendable type exported'; faultDesc[FaultID.NoTsReExportEts] = 'No ts re-export ets'; faultDesc[FaultID.NoSideEffectImportEtsToTs] = 'No side effect import ets to ts'; faultDesc[FaultID.NoNameSpaceImportEtsToTs] = 'No namespace import ets to ts'; faultDesc[FaultID.SendableExplicitFieldType] = 'Field in sendable class must have type annotation'; faultDesc[FaultID.SendableFunctionImportedVariables] = 'Sendable function imported variables'; faultDesc[FaultID.SendableFunctionDecorator] = 'Sendable function decorator'; faultDesc[FaultID.SendableTypeAliasDecorator] = 'Sendable typeAlias decorator'; faultDesc[FaultID.SendableTypeAliasDeclaration] = 'Sendable typeAlias declaration'; faultDesc[FaultID.SendableFunctionAssignment] = 'Sendable function assignment'; faultDesc[FaultID.SendableFunctionOverloadDecorator] = 'Sendable function overload decorator'; faultDesc[FaultID.SendableFunctionProperty] = 'Sendable function property'; faultDesc[FaultID.SendableFunctionAsExpr] = 'Sendable function as expr'; faultDesc[FaultID.SendableDecoratorLimited] = 'Sendable decorator limited'; faultDesc[FaultID.SharedModuleExportsWarning] = 'Shared module exports Warning'; faultDesc[FaultID.SendableBetaCompatible] = 'Sendable beta compatible'; faultDesc[FaultID.ObjectLiteralProperty] = 'Object literal property'; faultDesc[FaultID.OptionalMethod] = 'Optional method'; faultDesc[FaultID.ImportType] = 'Import type syntax'; faultDesc[FaultID.DynamicCtorCall] = 'Dynamic constructor call'; faultDesc[FaultID.MathPow] = 'Exponent call'; faultDesc[FaultID.IncompationbleFunctionType] = 'Incompationble function type'; faultDesc[FaultID.VoidOperator] = 'Void operator'; faultDesc[FaultID.ExponentOp] = 'Exponent operation'; faultDesc[FaultID.RegularExpressionLiteral] = 'Regex literals'; faultDesc[FaultID.ArgumentsObject] = 'Special arguments object inside functions'; faultDesc[FaultID.LimitedVoidType] = 'Limited void type'; faultDesc[FaultID.DecoratorsNotSupported] = 'Decorators are not supported'; faultDesc[FaultID.DebuggerStatement] = 'Debugger statement'; faultDesc[FaultID.TsOverload] = 'Ts Overload'; faultDesc[FaultID.NoSideEffectImport] = 'No side effect import'; faultDesc[FaultID.DynamicImport] = 'Dynamic import'; faultDesc[FaultID.ImportLazyIdentifier] = 'Import Lazy Identifier'; faultDesc[FaultID.CaseExpression] = 'Case Expression'; faultDesc[FaultID.SwitchExpression] = 'Switch Expression'; faultDesc[FaultID.LimitedLiteralType] = 'Limited literal type'; faultDesc[FaultID.IndexNegative] = 'Index negative'; faultDesc[FaultID.ArrayIndexExprType] = 'Array index expr type'; faultDesc[FaultID.NoTuplesArrays] = 'No tuples arrays'; faultDesc[FaultID.DoubleExclaBindingNotSupported] = 'Incorrect bidirectional data binding used "!!"'; faultDesc[FaultID.DoubleDollarBindingNotSupported] = 'Incorrect bidirectional data binding used "$$"'; faultDesc[FaultID.DollarBindingNotSupported] = 'Link decorator passing'; faultDesc[FaultID.ExtendDecoratorNotSupported] = '"@Extend" decorator'; faultDesc[FaultID.MethodOverridingField] = '"Method overriding field" to keep style consistent'; faultDesc[FaultID.InteropJsObjectConditionJudgment] = 'Interop JS Object usage in a condition'; faultDesc[FaultID.InteropJsObjectExpandStaticInstance] = 'Interop JS function usage'; faultDesc[FaultID.InteropJSFunctionInvoke] = 'Interop JS function invoke'; faultDesc[FaultID.ExplicitFunctionType] = 'Not explicit function type'; faultDesc[FaultID.ClassstaticInitialization] = 'The static properties of a class need to have initial values'; faultDesc[FaultID.AvoidUnionTypes] = 'Union types'; faultDesc[FaultID.TaggedTemplates] = 'Tagged template'; faultDesc[FaultID.InvalidIdentifier] = 'Invalid identifiers'; faultDesc[FaultID.ExtendsExpression] = 'Extends Expression'; faultDesc[FaultID.NumericSemantics] = 'Numeric semantics'; faultDesc[FaultID.AnimatableExtendDecoratorTransform] = '"@AnimatableExtend" decorator'; faultDesc[FaultID.InteropJsObjectExport] = 'Interop JS object export'; faultDesc[FaultID.DefaultArgsBehindRequiredArgs] = 'Default parameters before mandatory'; faultDesc[FaultID.NoDuplicateFunctionName] = 'No duplicate function name'; faultDesc[FaultID.OhmUrlFullPath] = 'Require full path file name'; faultDesc[FaultID.UIInterfaceImport] = 'UI interface'; faultDesc[FaultID.StylesDecoratorNotSupported] = '"@Styles" decorator'; faultDesc[FaultID.DataObservation] = 'Data observation'; faultDesc[FaultID.InteropCallReflect] = 'Interop call with Reflect API'; faultDesc[FaultID.InteropCallObjectParam] = 'Interop call with "Object" parameter'; faultDesc[FaultID.InteropDirectAccessToTSTypes] = 'TS Types Access'; faultDesc[FaultID.InteropTSFunctionInvoke] = 'TS Function Invoke'; faultDesc[FaultID.LimitedVoidTypeFromSdk] = 'Limited void type from sdk'; faultDesc[FaultID.UseSharedDeprecated] = '"use shared" is not supported'; faultDesc[FaultID.UseConcurrentDeprecated] = '"use concurrent" is not supported'; faultDesc[FaultID.MethodInheritRule] = 'Method parameters/returns violate inheritance principles'; faultDesc[FaultID.EntryAnnotation] = '"@Entry" decorator parameter'; faultDesc[FaultID.ProvideAnnotation] = '"@Provide" decorator parameter'; faultDesc[FaultID.InteropJsObjectInheritance] = 'Interop JS class inheritance'; faultDesc[FaultID.InteropJsObjectTraverseJsInstance] = 'Interop JS object traverse usage'; faultDesc[FaultID.InteropJsObjectCallStaticFunc] = 'Interop JS function usage'; faultDesc[FaultID.OptionalMethodFromSdk] = 'Optional method from sdk'; faultDesc[FaultID.SendablePropTypeFromSdk] = 'ISendable is no longer supported'; faultDesc[FaultID.ConstructorIfaceFromSdk] = 'Construct signatures are not supported in interfaces from sdk'; faultDesc[FaultID.PropertyAccessByIndexFromSdk] = 'property access by index from sdk'; faultDesc[FaultID.ConstructorTypesDeprecated] = 'Constructor funcs'; faultDesc[FaultID.QuotedHyphenPropsDeprecated] = 'Quoted hyphen props deprecated'; faultDesc[FaultID.DuplicateDeclNameFromSdk] = 'The API path has been changed due to the duplicate names in sdk.'; faultDesc[FaultID.SdkTypeQuery] = 'No typeof as a type in API'; faultDesc[FaultID.IsConcurrentDeprecated] = 'isConcurrent is not supported'; faultDesc[FaultID.InteropStaticObjectLiterals] = 'Interop call object literals'; faultDesc[FaultID.LimitedStdLibNoImportConcurrency] = 'Import Concurrency Deprecated'; faultDesc[FaultID.MissingSuperCall] = 'Missing super call with args'; faultDesc[FaultID.InterOpImportJs] = 'No JS import'; faultDesc[FaultID.InteropObjectLiteralAmbiguity] = 'Interop Object Literal ambiguity'; faultDesc[FaultID.InteropObjectLiteralClass] = 'Interop Object Literal incompatible with class'; faultDesc[FaultID.UnsupportPropNameFromValue] = 'Enum cannot get member name by value'; faultDesc[FaultID.CallJSFunction] = 'Call JS Function'; faultDesc[FaultID.InteropObjectProperty] = 'Interop property access'; faultDesc[FaultID.InterOpConvertImport] = 'No import primitive types from js file'; faultDesc[FaultID.InterOpImportJsForTypeOf] = 'TypeOf import from JS'; faultDesc[FaultID.InteropNoHaveNum] = 'Interop obj with "num" property'; faultDesc[FaultID.BinaryOperations] = 'Binary operations on js objects'; faultDesc[FaultID.InterOpImportJsDataCompare] = 'NO js import data compare'; faultDesc[FaultID.InteropEqualityJudgment] = 'Equality operator with JS objects'; faultDesc[FaultID.InterOpImportJsIndex] = 'No js index import'; faultDesc[FaultID.InstantiatedJsOjbect] = 'Instantiated js ojbect'; faultDesc[FaultID.InteropCallObjectMethods] = 'Interop call methods in object'; faultDesc[FaultID.InteropJsInstanceof] = 'Instanceof operator with interop'; faultDesc[FaultID.InteropIncrementDecrement] = 'Interop increment or decrement'; faultDesc[FaultID.BuiltinThisArgs] = 'No thisArgs as a type in API'; faultDesc[FaultID.BuiltinSymbolIterator] = 'No "Symbol.iterator" in API'; faultDesc[FaultID.NoPropertyDescriptor] = 'Not support property descriptor'; faultDesc[FaultID.BuiltinNoCtorFunc] = 'Api is not support ctor-signature and call-signature'; faultDesc[FaultID.SharedArrayBufferDeprecated] = 'SharedArrayBuffer is not supported'; faultDesc[FaultID.SetCloneListDeprecated] = 'setCloneList is not supported'; faultDesc[FaultID.SetTransferListDeprecated] = 'setTransferList is not supported'; faultDesc[FaultID.SdkAbilityAsynchronousLifecycle] = '1.2 Void cannot be combined'; faultDesc[FaultID.LimitedStdLibNoSendableDecorator] = 'Limited stdlib no sendable decorator'; faultDesc[FaultID.LimitedStdLibNoDoncurrentDecorator] = 'Limited stdlib no concurrent decorator'; faultDesc[FaultID.NoNeedStdlibWorker] = 'No need stdlib worker'; faultDesc[FaultID.BuiltinGetOwnPropertyNames] = 'No "Object.getOwnPropertyNames" in API'; faultDesc[FaultID.LocalBuilderDecoratorNotSupported] = '"@LocalBuilder" decorator'; faultDesc[FaultID.MakeObservedIsNotSupported] = 'MakeObserved is not supported'; faultDesc[FaultID.NoEnumPropAsType] = 'No enum prop as type'; faultDesc[FaultID.NoAwaitJsPromise] = 'No await js promise'; faultDesc[FaultID.NosparseArray] = 'No sparse array'; faultDesc[FaultID.NoTsLikeSmartType] = 'No ts like smart type'; faultDesc[FaultID.ArrayTypeImmutable] = 'Array type immutable'; faultDesc[FaultID.CreatingPrimitiveTypes] = 'Creating primitive types'; faultDesc[FaultID.TsLikeCatchType] = 'TS like catch type'; faultDesc[FaultID.NumericBigintCompare] = 'No Comparison number between bigint'; faultDesc[FaultID.NondecimalBigint] = 'No non decimal'; faultDesc[FaultID.UnsupportOperator] = 'Unsupport operator'; faultDesc[FaultID.CustomLayoutNeedAddDecorator] = 'Custom layout need add decorator'; faultDesc[FaultID.PropDecoratorNotSupported] = '"@Prop" decorator is not supported'; faultDesc[FaultID.StoragePropDecoratorNotSupported] = '"@StorageProp" decorator is not supported'; faultDesc[FaultID.LocalStoragePropDecoratorNotSupported] = '"@LocalStorageProp" decorator is not supported'; faultDesc[FaultID.PropFunctionNotSupported] = '"prop" function is not supported'; faultDesc[FaultID.SetAndPropFunctionNotSupported] = '"setAndProp" function is not supported'; faultDesc[FaultID.PropNeedCallMethodForDeepCopy] = 'Deep copy needs to call the specific method'; faultDesc[FaultID.StateStylesBlockNeedArrowFunc] = 'StateStyles needs arrow function block'; faultDesc[FaultID.PromiseVoidNeedResolveArg] = 'Promiseconstructor only supports using resolve (undefined)';