diff --git a/arkui-plugins/interop-plugins/decl_transformer.ts b/arkui-plugins/interop-plugins/decl_transformer.ts index 3aee2f8f8d3bbe7f6190bf2fe15464a06435c6d1..58d5a6a6dcad76f8c71bb8cdd6aa3ea2aafcdade 100644 --- a/arkui-plugins/interop-plugins/decl_transformer.ts +++ b/arkui-plugins/interop-plugins/decl_transformer.ts @@ -105,7 +105,7 @@ export class DeclTransformer extends AbstractVisitor { node.name, node.name?.name ), - arkts.factory.createFunctionExpression(updateFunc), + updateFunc, node.modifiers, false ); diff --git a/compiler/src/process_interop_ui.ts b/compiler/src/process_interop_ui.ts index 489f357daf36b52abb90008c5988ecc5835ed29f..ee086a62f774bf6ed52992095eae1f2f3bc008ab 100644 --- a/compiler/src/process_interop_ui.ts +++ b/compiler/src/process_interop_ui.ts @@ -93,28 +93,6 @@ class HandleUIImports { } private visitNode(node: ts.Node): ts.Node | undefined { - // TODO, declare struct => struct - if (node.parent && isStructDeclaration(node.parent) && ts.isModifier(node) && - node.kind === ts.SyntaxKind.DeclareKeyword) { - return; - } - - // TODO, build() => build() {} - if (node.parent && isStructDeclaration(node.parent) && ts.isMethodDeclaration(node) && - node.name && ts.isIdentifier(node.name) && node.name.escapedText.toString() === "build") { - return ts.factory.updateMethodDeclaration(node, - undefined, - undefined, - undefined, - node.name, - undefined, - undefined, - undefined, - undefined, - ts.factory.createBlock([], false) - ); - } - // delete constructor if (node.parent && isStructDeclaration(node.parent) && ts.isConstructorDeclaration(node)) { return;