问题场景编译提示:Object literals cannot be used as type declarations (ArkTS-no-obj-literals-as-types) <ArkTSCheck\>代码:@Builder overBuilder($$: { paramA1: string }) { Row() { Text(`UseStateVarByReference: ${$$.paramA1} `) }参考代码:class Tmp{ paramA1:string = ‘’ } @Builder function overBuilder($$ : Tmp) { Text($$.params) .width(400) .height(50) .backgroundColor(Color.Blue) }
问题场景
编译提示:Object literals cannot be used as type declarations (ArkTS-no-obj-literals-as-types) <ArkTSCheck\>
代码:
参考代码: