From 33b8c1177d3758aac8ae7c93e970bd1c0a018653 Mon Sep 17 00:00:00 2001 From: bojiang Date: Fri, 9 Sep 2022 14:20:57 +0800 Subject: [PATCH] fixed 52e2294 from https://gitee.com/BoJiang4702/developtools_ace-ets2bundle/pulls/1107 jiangbo91@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复@BuildParse修饰的属性不赋值不报错的情况 Signed-off-by: bojiang Change-Id: Ibd4f460e8709113bb8d9742fa51998156b13a248 --- compiler/src/process_custom_component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/process_custom_component.ts b/compiler/src/process_custom_component.ts index 0c78a2f..89444ff 100644 --- a/compiler/src/process_custom_component.ts +++ b/compiler/src/process_custom_component.ts @@ -163,6 +163,7 @@ function validateCustomComponentPrams(node: ts.ExpressionStatement, name: string } }); } + validateMandatoryToAssignmentViaParam(node, name, curChildProps, log); } function getCustomComponentName(newNode: ts.NewExpression): string { @@ -402,7 +403,7 @@ function validateNonExistentProperty(node: ts.ObjectLiteralElementLike, }); } -function validateMandatoryToAssignmentViaParam(node: ts.ExpressionStatement, customComponentName: string, +function validateMandatoryToAssignmentViaParam(node: ts.CallExpression, customComponentName: string, curChildProps: Set, log: LogInfo[]): void { if (builderParamObjectCollection.get(customComponentName) && builderParamObjectCollection.get(customComponentName).size) {