工程编译告警提示“ArkTS:WARN: For details about ArkTS syntax errors”
===========================================================

**问题现象**

工程构建时，出现ArkTS语法告警提示，详情请参见FAQ。

报错信息：

1.  ERROR: ArkTS:ERROR File: C:/Users/... ,Use "let" instead of "var" (arkts-no-var)
2.  ERROR: ArkTS:ERROR File: D:/DTS/MyApplicationAPI12/... ,The "@Sendable" decorator can only be used on "class", "function" and "typeAlias" (arkts-sendable-decorator-limited)

![](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_scene_100_1/49/v3/tWB71aAqRTS44ysT9KKGMg/zh-cn_image_0000002429325678.png?HW-CC-KV=V1&HW-CC-Date=20260612T074807Z&HW-CC-Expire=86400&HW-CC-Sign=D17248598C3A52FCE310589A56524FEF67591A725249EF02F84740ED20EA0C62)

![](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_scene_100_1/8f/v3/j6YM6Y_WRv6yFZzsX7cYvA/zh-cn_image_0000002429485750.png?HW-CC-KV=V1&HW-CC-Date=20260612T074807Z&HW-CC-Expire=86400&HW-CC-Sign=F255646FEB5CEF0C788A3F45C7CDF095A1603503EA974982C3265276DA5449B3)

**解决措施**

该告警表明工程中存在不符合ArkTS语法规范的代码，请根据ERROR报错中的报错信息进行修改，或根据提示的语法规则(如arkts-no-var、arkts-sendable-decorator-limited等)，在本网站搜索对应的说明，修改为ArkTS规范写法。ArkTS语言相关介绍请查看[ArkTS（方舟编程语言）](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/arkts)