From 64e6ba29bc9e5870b5d59ae8d43b1081294ea4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BA=86=E6=B3=89?= Date: Tue, 18 Oct 2022 16:08:20 +0800 Subject: [PATCH] Update uts-for-android.md --- docs/plugin/uts-for-android.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/plugin/uts-for-android.md b/docs/plugin/uts-for-android.md index 0dd29ef2a..21c713f96 100644 --- a/docs/plugin/uts-for-android.md +++ b/docs/plugin/uts-for-android.md @@ -428,6 +428,21 @@ class ScreenReceiver extends BroadcastReceiver{ } ``` +### 4.10 UTS 中下划线前缀的变量,有屏蔽未使用警告的含义 + +```uts +// IDE会提示 name,status,desc 变量未使用 +onStatusUpdate(name:string, status:Int, desc:string){ + +} + + +// 不会警告变量未使用 +onStatusUpdate(_name:string, _status:Int, _desc:string){ + +} +``` + ## 5 常见问题(持续更新) -- GitLab