Skip to content

Commit

Permalink
Improve the annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Dec 20, 2024
1 parent fb2de12 commit c2bc75c
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions cocos/native-binding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1264,19 +1264,29 @@ export declare namespace native {
*
* @param className : @en the class name of the Objective-C/Java/ArkTs class @zh Objective-C/Java/ArkTs 类的类名
* @param methodName : @en the method name of the Objective-C/Java/ArkT class @zh Objective-C/Java/ArkT 类的方法名
* @param methodSignature : @en the method signature of the Objective-C/Java class.
* The HarmonyOS Next platform represents an input parameter that can only have one and must be of type string
* If more than one parameter, it can be converted to a json string.
* @zh Objective-C/Java/ArkT 方法签名。
* HarmonyOS Next平台这个代表输入参数并且只能有一个,类型必须是string类型。如果有多个参数,可以转成json字符串。
* @param parameters : @en the parameters of the Objective-C/Java class to translate.
* On the HarmonyOS Next platform this means that the function call is either synchronous or asynchronous.
* This parameter only works on the HarmonyOS Next platform.
* The default is true, which means that the synchronization method is called.
* Calling asynchronous methods may block waiting for asynchronous results.
* @zh 传递至该 Objective-C/Java 方法的参数。
* HarmonyOS Next 平台这个代表调用函数是同步的或是异步。此参数仅在HarmonyOS Next平台上有效。
* 默认是true代表调用的是同步方法。调用异步方法时可能会阻塞等待异步结果。
* @param methodSignature :
* @en
* - On the Android platform: Represents the method signature of the Java class.
* - On the Mac/iOS platform: Represents the first parameter of the Objective-C method.
* - On the HarmonyOS Next platform: Represents all parameters of the ArkTs method.
* If multiple parameters are required, can be converted into a JSON string.
* @zh
* - 在 Android 平台:表示 Java 方法的签名。
* - 在 Mac 或 iOS 平台:表示 Objective-C 方法的第一个参数。
* - 在 HarmonyOS Next 平台:表示 ArkTs 方法的所有参数。如果需要传入多个参数,可以将它们转换为 JSON 字符串。
*
* @param parameters :
* @en
* - On the Android platform: Represents the parameters passed to the Java method.
* - On the Mac/iOS platform: Represents the second or subsequent parameters of the Objective-C method.
* - On the HarmonyOS Next platform: Indicates whether the ArkTs method is synchronous or asynchronous.
* The default is `true`, meaning the ArkTs method is called synchronously.
* Note that calling asynchronous ArkTs methods may block while waiting for results.
* @zh
* - 在 Android 平台:传递到 Java 方法的参数。
* - 在 Mac 或 iOS 平台:传递到 Objective-C 方法的第二个或更多参数。
* - 在 HarmonyOS Next 平台:表示调用 ArkTs 方法是同步还是异步。
* 默认值为 `true`,表示调用ArkTs的同步方法。注意,调用异步方法可能会阻塞以等待结果。
*/
export function callStaticMethod(className: string, methodName: string, methodSignature: string, ...parameters: any): any;
}
Expand Down

0 comments on commit c2bc75c

Please sign in to comment.