@idlizer/arktscgen 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libarkts-copy/generator/options.json5 +155 -0
- package/build/libarkts-copy/native/meson.build +62 -0
- package/build/libarkts-copy/native/meson_options.txt +24 -0
- package/build/libarkts-copy/native/src/bridges.cc +265 -0
- package/build/libarkts-copy/native/src/common.cc +231 -0
- package/build/libarkts-copy/native/src/common.h +39 -0
- package/build/libarkts-copy/native/src/generated/bridges.cc +11979 -0
- package/build/libarkts-copy/package.json +51 -0
- package/build/libarkts-copy/src/Es2pandaEnums.ts +183 -0
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +123 -0
- package/build/libarkts-copy/src/InteropNativeModule.ts +50 -0
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +31 -0
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +147 -0
- package/build/libarkts-copy/src/arkts-api/index.ts +28 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createCallExpression.ts +40 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createNumberLiteral.ts +28 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/createScriptFunction.ts +55 -0
- package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +45 -0
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +121 -0
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +52 -0
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +46 -0
- package/build/libarkts-copy/src/arkts-api/peers/Program.ts +55 -0
- package/build/libarkts-copy/src/arkts-api/static/global.ts +67 -0
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +69 -0
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +156 -0
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +135 -0
- package/build/libarkts-copy/src/arkts-api/visitor.ts +297 -0
- package/build/libarkts-copy/src/es2panda.ts +277 -0
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1266 -0
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +3745 -0
- package/build/libarkts-copy/src/generated/factory.ts +1299 -0
- package/build/libarkts-copy/src/generated/index.ts +191 -0
- package/build/libarkts-copy/src/generated/node-map.ts +182 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +110 -0
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +74 -0
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +98 -0
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +70 -0
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +42 -0
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +97 -0
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +233 -0
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +80 -0
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +70 -0
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +74 -0
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +52 -0
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ETSDynamicFunctionType.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +84 -0
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +68 -0
- package/build/libarkts-copy/src/generated/peers/ETSLaunchExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +126 -0
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +51 -0
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +73 -0
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +68 -0
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +55 -0
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +73 -0
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/Expression.ts +75 -0
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +59 -0
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/FunctionDecl.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +154 -0
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/InterfaceDecl.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/Literal.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +48 -0
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +95 -0
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +105 -0
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +76 -0
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +47 -0
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +90 -0
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/Property.ts +82 -0
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +201 -0
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +79 -0
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +82 -0
- package/build/libarkts-copy/src/generated/peers/Statement.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +76 -0
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +81 -0
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +66 -0
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +67 -0
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +65 -0
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +56 -0
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +102 -0
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +64 -0
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +66 -0
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +72 -0
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +67 -0
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +88 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +63 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +84 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +62 -0
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +61 -0
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +59 -0
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +54 -0
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +75 -0
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +49 -0
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +39 -0
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +40 -0
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +53 -0
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +57 -0
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +50 -0
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +60 -0
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +42 -0
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +71 -0
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +69 -0
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +58 -0
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +56 -0
- package/build/libarkts-copy/src/reexport-for-generated.ts +33 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +1375 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +110 -0
- package/build/libarkts-copy/src/ts-api/index.ts +35 -0
- package/build/libarkts-copy/src/ts-api/static/enums.ts +18 -0
- package/build/libarkts-copy/src/ts-api/types.ts +920 -0
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +289 -0
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +55 -0
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +155 -0
- package/build/libarkts-copy/src/utils.ts +89 -0
- package/build/libarkts-copy/tsconfig.json +15 -0
- package/lib/index.js +11858 -0
- package/package.json +54 -0
- package/templates/Es2pandaEnums.ts +16 -0
- package/templates/Es2pandaNativeModule.ts +32 -0
- package/templates/bridges.cc +18 -0
- package/templates/factory.ts +34 -0
- package/templates/index.ts +16 -0
- package/templates/node-map.ts +31 -0
- package/templates/peer.ts +32 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
export class TSInterfaceBody extends Expression {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 131)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody {
|
|
39
|
+
return new TSInterfaceBody(global.generatedEs2panda._CreateTSInterfaceBody(global.context, passNodeArray(body), body.length))
|
|
40
|
+
}
|
|
41
|
+
static updateTSInterfaceBody(original: TSInterfaceBody | undefined, body: readonly AstNode[]): TSInterfaceBody {
|
|
42
|
+
return new TSInterfaceBody(global.generatedEs2panda._UpdateTSInterfaceBody(global.context, passNode(original), passNodeArray(body), body.length))
|
|
43
|
+
}
|
|
44
|
+
get body(): readonly AstNode[] {
|
|
45
|
+
return unpackNodeArray(global.generatedEs2panda._TSInterfaceBodyBodyConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isTSInterfaceBody(node: object | undefined): node is TSInterfaceBody {
|
|
49
|
+
return node instanceof TSInterfaceBody
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(131)) {
|
|
52
|
+
nodeByType.set(131, TSInterfaceBody)
|
|
53
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { AnnotationUsage } from "./AnnotationUsage"
|
|
33
|
+
import { ClassDeclaration } from "./ClassDeclaration"
|
|
34
|
+
import { Decorator } from "./Decorator"
|
|
35
|
+
import { Identifier } from "./Identifier"
|
|
36
|
+
import { TSInterfaceBody } from "./TSInterfaceBody"
|
|
37
|
+
import { TSInterfaceHeritage } from "./TSInterfaceHeritage"
|
|
38
|
+
import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
|
|
39
|
+
import { TypedStatement } from "./TypedStatement"
|
|
40
|
+
export class TSInterfaceDeclaration extends TypedStatement {
|
|
41
|
+
constructor(pointer: KNativePointer) {
|
|
42
|
+
assertValidPeer(pointer, 130)
|
|
43
|
+
super(pointer)
|
|
44
|
+
}
|
|
45
|
+
static createTSInterfaceDeclaration(_extends: readonly TSInterfaceHeritage[], id: AstNode | undefined, typeParams: AstNode | undefined, body: AstNode | undefined, isStatic: boolean, isExternal: boolean): TSInterfaceDeclaration {
|
|
46
|
+
return new TSInterfaceDeclaration(global.generatedEs2panda._CreateTSInterfaceDeclaration(global.context, passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal))
|
|
47
|
+
}
|
|
48
|
+
static updateTSInterfaceDeclaration(original: TSInterfaceDeclaration | undefined, _extends: readonly TSInterfaceHeritage[], id: AstNode | undefined, typeParams: AstNode | undefined, body: AstNode | undefined, isStatic: boolean, isExternal: boolean): TSInterfaceDeclaration {
|
|
49
|
+
return new TSInterfaceDeclaration(global.generatedEs2panda._UpdateTSInterfaceDeclaration(global.context, passNode(original), passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal))
|
|
50
|
+
}
|
|
51
|
+
get body(): TSInterfaceBody | undefined {
|
|
52
|
+
return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationBodyConst(global.context, this.peer))
|
|
53
|
+
}
|
|
54
|
+
get id(): Identifier | undefined {
|
|
55
|
+
return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationIdConst(global.context, this.peer))
|
|
56
|
+
}
|
|
57
|
+
get internalName(): string {
|
|
58
|
+
return unpackString(global.generatedEs2panda._TSInterfaceDeclarationInternalNameConst(global.context, this.peer))
|
|
59
|
+
}
|
|
60
|
+
/** @deprecated */
|
|
61
|
+
setInternalName(internalName: string): this {
|
|
62
|
+
global.generatedEs2panda._TSInterfaceDeclarationSetInternalName(global.context, this.peer, internalName)
|
|
63
|
+
return this
|
|
64
|
+
}
|
|
65
|
+
get isStatic(): boolean {
|
|
66
|
+
return global.generatedEs2panda._TSInterfaceDeclarationIsStaticConst(global.context, this.peer)
|
|
67
|
+
}
|
|
68
|
+
get isFromExternal(): boolean {
|
|
69
|
+
return global.generatedEs2panda._TSInterfaceDeclarationIsFromExternalConst(global.context, this.peer)
|
|
70
|
+
}
|
|
71
|
+
get typeParams(): TSTypeParameterDeclaration | undefined {
|
|
72
|
+
return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationTypeParamsConst(global.context, this.peer))
|
|
73
|
+
}
|
|
74
|
+
get extends(): readonly TSInterfaceHeritage[] {
|
|
75
|
+
return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtendsConst(global.context, this.peer))
|
|
76
|
+
}
|
|
77
|
+
get decorators(): readonly Decorator[] {
|
|
78
|
+
return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationDecoratorsConst(global.context, this.peer))
|
|
79
|
+
}
|
|
80
|
+
get anonClass(): ClassDeclaration | undefined {
|
|
81
|
+
return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationGetAnonClassConst(global.context, this.peer))
|
|
82
|
+
}
|
|
83
|
+
/** @deprecated */
|
|
84
|
+
setAnonClass(anonClass?: ClassDeclaration): this {
|
|
85
|
+
global.generatedEs2panda._TSInterfaceDeclarationSetAnonClass(global.context, this.peer, passNode(anonClass))
|
|
86
|
+
return this
|
|
87
|
+
}
|
|
88
|
+
get annotations(): readonly AnnotationUsage[] {
|
|
89
|
+
return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotationsConst(global.context, this.peer))
|
|
90
|
+
}
|
|
91
|
+
/** @deprecated */
|
|
92
|
+
setAnnotations(annotations: readonly AnnotationUsage[]): this {
|
|
93
|
+
global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length)
|
|
94
|
+
return this
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export function isTSInterfaceDeclaration(node: object | undefined): node is TSInterfaceDeclaration {
|
|
98
|
+
return node instanceof TSInterfaceDeclaration
|
|
99
|
+
}
|
|
100
|
+
if (!nodeByType.has(130)) {
|
|
101
|
+
nodeByType.set(130, TSInterfaceDeclaration)
|
|
102
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TypeNode } from "./TypeNode"
|
|
34
|
+
export class TSInterfaceHeritage extends Expression {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 132)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage {
|
|
40
|
+
return new TSInterfaceHeritage(global.generatedEs2panda._CreateTSInterfaceHeritage(global.context, passNode(expr)))
|
|
41
|
+
}
|
|
42
|
+
static updateTSInterfaceHeritage(original?: TSInterfaceHeritage, expr?: TypeNode): TSInterfaceHeritage {
|
|
43
|
+
return new TSInterfaceHeritage(global.generatedEs2panda._UpdateTSInterfaceHeritage(global.context, passNode(original), passNode(expr)))
|
|
44
|
+
}
|
|
45
|
+
get expr(): TypeNode | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._TSInterfaceHeritageExprConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isTSInterfaceHeritage(node: object | undefined): node is TSInterfaceHeritage {
|
|
50
|
+
return node instanceof TSInterfaceHeritage
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(132)) {
|
|
53
|
+
nodeByType.set(132, TSInterfaceHeritage)
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TypeNode } from "./TypeNode"
|
|
34
|
+
export class TSIntersectionType extends TypeNode {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 112)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSIntersectionType(types: readonly Expression[]): TSIntersectionType {
|
|
40
|
+
return new TSIntersectionType(global.generatedEs2panda._CreateTSIntersectionType(global.context, passNodeArray(types), types.length))
|
|
41
|
+
}
|
|
42
|
+
static updateTSIntersectionType(original: TSIntersectionType | undefined, types: readonly Expression[]): TSIntersectionType {
|
|
43
|
+
return new TSIntersectionType(global.generatedEs2panda._UpdateTSIntersectionType(global.context, passNode(original), passNodeArray(types), types.length))
|
|
44
|
+
}
|
|
45
|
+
get types(): readonly Expression[] {
|
|
46
|
+
return unpackNodeArray(global.generatedEs2panda._TSIntersectionTypeTypesConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isTSIntersectionType(node: object | undefined): node is TSIntersectionType {
|
|
50
|
+
return node instanceof TSIntersectionType
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(112)) {
|
|
53
|
+
nodeByType.set(112, TSIntersectionType)
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TypeNode } from "./TypeNode"
|
|
34
|
+
export class TSLiteralType extends TypeNode {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 108)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSLiteralType(literal?: Expression): TSLiteralType {
|
|
40
|
+
return new TSLiteralType(global.generatedEs2panda._CreateTSLiteralType(global.context, passNode(literal)))
|
|
41
|
+
}
|
|
42
|
+
static updateTSLiteralType(original?: TSLiteralType, literal?: Expression): TSLiteralType {
|
|
43
|
+
return new TSLiteralType(global.generatedEs2panda._UpdateTSLiteralType(global.context, passNode(original), passNode(literal)))
|
|
44
|
+
}
|
|
45
|
+
get literal(): Expression | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._TSLiteralTypeLiteralConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function isTSLiteralType(node: object | undefined): node is TSLiteralType {
|
|
50
|
+
return node instanceof TSLiteralType
|
|
51
|
+
}
|
|
52
|
+
if (!nodeByType.has(108)) {
|
|
53
|
+
nodeByType.set(108, TSLiteralType)
|
|
54
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Es2pandaMappedOption } from "./../Es2pandaEnums"
|
|
33
|
+
import { TSTypeParameter } from "./TSTypeParameter"
|
|
34
|
+
import { TypeNode } from "./TypeNode"
|
|
35
|
+
export class TSMappedType extends TypeNode {
|
|
36
|
+
constructor(pointer: KNativePointer) {
|
|
37
|
+
assertValidPeer(pointer, 113)
|
|
38
|
+
super(pointer)
|
|
39
|
+
}
|
|
40
|
+
static createTSMappedType(typeParameter: TSTypeParameter | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: Es2pandaMappedOption, optional_arg: Es2pandaMappedOption): TSMappedType {
|
|
41
|
+
return new TSMappedType(global.generatedEs2panda._CreateTSMappedType(global.context, passNode(typeParameter), passNode(typeAnnotation), readonly_arg, optional_arg))
|
|
42
|
+
}
|
|
43
|
+
static updateTSMappedType(original: TSMappedType | undefined, typeParameter: TSTypeParameter | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: Es2pandaMappedOption, optional_arg: Es2pandaMappedOption): TSMappedType {
|
|
44
|
+
return new TSMappedType(global.generatedEs2panda._UpdateTSMappedType(global.context, passNode(original), passNode(typeParameter), passNode(typeAnnotation), readonly_arg, optional_arg))
|
|
45
|
+
}
|
|
46
|
+
get typeParameter(): TSTypeParameter | undefined {
|
|
47
|
+
return unpackNode(global.generatedEs2panda._TSMappedTypeTypeParameter(global.context, this.peer))
|
|
48
|
+
}
|
|
49
|
+
get typeAnnotation(): TypeNode | undefined {
|
|
50
|
+
return unpackNode(global.generatedEs2panda._TSMappedTypeTypeAnnotation(global.context, this.peer))
|
|
51
|
+
}
|
|
52
|
+
get readonly(): Es2pandaMappedOption {
|
|
53
|
+
return global.generatedEs2panda._TSMappedTypeReadonly(global.context, this.peer)
|
|
54
|
+
}
|
|
55
|
+
get optional(): Es2pandaMappedOption {
|
|
56
|
+
return global.generatedEs2panda._TSMappedTypeOptional(global.context, this.peer)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function isTSMappedType(node: object | undefined): node is TSMappedType {
|
|
60
|
+
return node instanceof TSMappedType
|
|
61
|
+
}
|
|
62
|
+
if (!nodeByType.has(113)) {
|
|
63
|
+
nodeByType.set(113, TSMappedType)
|
|
64
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { FunctionSignature } from "./FunctionSignature"
|
|
34
|
+
import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration"
|
|
35
|
+
import { TypeNode } from "./TypeNode"
|
|
36
|
+
export class TSMethodSignature extends AstNode {
|
|
37
|
+
constructor(pointer: KNativePointer) {
|
|
38
|
+
assertValidPeer(pointer, 105)
|
|
39
|
+
super(pointer)
|
|
40
|
+
}
|
|
41
|
+
static createTSMethodSignature(key: Expression | undefined, signature: FunctionSignature | undefined, computed: boolean, optional_arg: boolean): TSMethodSignature {
|
|
42
|
+
return new TSMethodSignature(global.generatedEs2panda._CreateTSMethodSignature(global.context, passNode(key), passNode(signature), computed, optional_arg))
|
|
43
|
+
}
|
|
44
|
+
static updateTSMethodSignature(original: TSMethodSignature | undefined, key: Expression | undefined, signature: FunctionSignature | undefined, computed: boolean, optional_arg: boolean): TSMethodSignature {
|
|
45
|
+
return new TSMethodSignature(global.generatedEs2panda._UpdateTSMethodSignature(global.context, passNode(original), passNode(key), passNode(signature), computed, optional_arg))
|
|
46
|
+
}
|
|
47
|
+
get key(): Expression | undefined {
|
|
48
|
+
return unpackNode(global.generatedEs2panda._TSMethodSignatureKeyConst(global.context, this.peer))
|
|
49
|
+
}
|
|
50
|
+
get typeParams(): TSTypeParameterDeclaration | undefined {
|
|
51
|
+
return unpackNode(global.generatedEs2panda._TSMethodSignatureTypeParamsConst(global.context, this.peer))
|
|
52
|
+
}
|
|
53
|
+
get params(): readonly Expression[] {
|
|
54
|
+
return unpackNodeArray(global.generatedEs2panda._TSMethodSignatureParamsConst(global.context, this.peer))
|
|
55
|
+
}
|
|
56
|
+
get returnTypeAnnotation(): TypeNode | undefined {
|
|
57
|
+
return unpackNode(global.generatedEs2panda._TSMethodSignatureReturnTypeAnnotationConst(global.context, this.peer))
|
|
58
|
+
}
|
|
59
|
+
get computed(): boolean {
|
|
60
|
+
return global.generatedEs2panda._TSMethodSignatureComputedConst(global.context, this.peer)
|
|
61
|
+
}
|
|
62
|
+
get optional(): boolean {
|
|
63
|
+
return global.generatedEs2panda._TSMethodSignatureOptionalConst(global.context, this.peer)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function isTSMethodSignature(node: object | undefined): node is TSMethodSignature {
|
|
67
|
+
return node instanceof TSMethodSignature
|
|
68
|
+
}
|
|
69
|
+
if (!nodeByType.has(105)) {
|
|
70
|
+
nodeByType.set(105, TSMethodSignature)
|
|
71
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Statement } from "./Statement"
|
|
33
|
+
export class TSModuleBlock extends Statement {
|
|
34
|
+
constructor(pointer: KNativePointer) {
|
|
35
|
+
assertValidPeer(pointer, 114)
|
|
36
|
+
super(pointer)
|
|
37
|
+
}
|
|
38
|
+
static createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock {
|
|
39
|
+
return new TSModuleBlock(global.generatedEs2panda._CreateTSModuleBlock(global.context, passNodeArray(statements), statements.length))
|
|
40
|
+
}
|
|
41
|
+
static updateTSModuleBlock(original: TSModuleBlock | undefined, statements: readonly Statement[]): TSModuleBlock {
|
|
42
|
+
return new TSModuleBlock(global.generatedEs2panda._UpdateTSModuleBlock(global.context, passNode(original), passNodeArray(statements), statements.length))
|
|
43
|
+
}
|
|
44
|
+
get statements(): readonly Statement[] {
|
|
45
|
+
return unpackNodeArray(global.generatedEs2panda._TSModuleBlockStatementsConst(global.context, this.peer))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isTSModuleBlock(node: object | undefined): node is TSModuleBlock {
|
|
49
|
+
return node instanceof TSModuleBlock
|
|
50
|
+
}
|
|
51
|
+
if (!nodeByType.has(114)) {
|
|
52
|
+
nodeByType.set(114, TSModuleBlock)
|
|
53
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { Statement } from "./Statement"
|
|
34
|
+
export class TSModuleDeclaration extends Statement {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 122)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSModuleDeclaration(name: Expression | undefined, body: Statement | undefined, declare: boolean, _global: boolean): TSModuleDeclaration {
|
|
40
|
+
return new TSModuleDeclaration(global.generatedEs2panda._CreateTSModuleDeclaration(global.context, passNode(name), passNode(body), declare, _global))
|
|
41
|
+
}
|
|
42
|
+
static updateTSModuleDeclaration(original: TSModuleDeclaration | undefined, name: Expression | undefined, body: Statement | undefined, declare: boolean, _global: boolean): TSModuleDeclaration {
|
|
43
|
+
return new TSModuleDeclaration(global.generatedEs2panda._UpdateTSModuleDeclaration(global.context, passNode(original), passNode(name), passNode(body), declare, _global))
|
|
44
|
+
}
|
|
45
|
+
get name(): Expression | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._TSModuleDeclarationNameConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get body(): Statement | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._TSModuleDeclarationBodyConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
get global(): boolean {
|
|
52
|
+
return global.generatedEs2panda._TSModuleDeclarationGlobalConst(global.context, this.peer)
|
|
53
|
+
}
|
|
54
|
+
get isExternalOrAmbient(): boolean {
|
|
55
|
+
return global.generatedEs2panda._TSModuleDeclarationIsExternalOrAmbientConst(global.context, this.peer)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export function isTSModuleDeclaration(node: object | undefined): node is TSModuleDeclaration {
|
|
59
|
+
return node instanceof TSModuleDeclaration
|
|
60
|
+
}
|
|
61
|
+
if (!nodeByType.has(122)) {
|
|
62
|
+
nodeByType.set(122, TSModuleDeclaration)
|
|
63
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 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
|
+
|
|
16
|
+
import {
|
|
17
|
+
global,
|
|
18
|
+
passNode,
|
|
19
|
+
passNodeArray,
|
|
20
|
+
unpackNonNullableNode,
|
|
21
|
+
unpackNode,
|
|
22
|
+
unpackNodeArray,
|
|
23
|
+
assertValidPeer,
|
|
24
|
+
AstNode,
|
|
25
|
+
Es2pandaAstNodeType,
|
|
26
|
+
KNativePointer,
|
|
27
|
+
nodeByType,
|
|
28
|
+
ArktsObject,
|
|
29
|
+
unpackString
|
|
30
|
+
} from "../../reexport-for-generated"
|
|
31
|
+
|
|
32
|
+
import { Expression } from "./Expression"
|
|
33
|
+
import { TypeNode } from "./TypeNode"
|
|
34
|
+
export class TSNamedTupleMember extends TypeNode {
|
|
35
|
+
constructor(pointer: KNativePointer) {
|
|
36
|
+
assertValidPeer(pointer, 134)
|
|
37
|
+
super(pointer)
|
|
38
|
+
}
|
|
39
|
+
static createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, optional_arg: boolean): TSNamedTupleMember {
|
|
40
|
+
return new TSNamedTupleMember(global.generatedEs2panda._CreateTSNamedTupleMember(global.context, passNode(label), passNode(elementType), optional_arg))
|
|
41
|
+
}
|
|
42
|
+
static updateTSNamedTupleMember(original: TSNamedTupleMember | undefined, label: Expression | undefined, elementType: TypeNode | undefined, optional_arg: boolean): TSNamedTupleMember {
|
|
43
|
+
return new TSNamedTupleMember(global.generatedEs2panda._UpdateTSNamedTupleMember(global.context, passNode(original), passNode(label), passNode(elementType), optional_arg))
|
|
44
|
+
}
|
|
45
|
+
get label(): Expression | undefined {
|
|
46
|
+
return unpackNode(global.generatedEs2panda._TSNamedTupleMemberLabelConst(global.context, this.peer))
|
|
47
|
+
}
|
|
48
|
+
get elementType(): TypeNode | undefined {
|
|
49
|
+
return unpackNode(global.generatedEs2panda._TSNamedTupleMemberElementTypeConst(global.context, this.peer))
|
|
50
|
+
}
|
|
51
|
+
get isOptional(): boolean {
|
|
52
|
+
return global.generatedEs2panda._TSNamedTupleMemberIsOptionalConst(global.context, this.peer)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function isTSNamedTupleMember(node: object | undefined): node is TSNamedTupleMember {
|
|
56
|
+
return node instanceof TSNamedTupleMember
|
|
57
|
+
}
|
|
58
|
+
if (!nodeByType.has(134)) {
|
|
59
|
+
nodeByType.set(134, TSNamedTupleMember)
|
|
60
|
+
}
|