assistsx-js 0.0.2037 → 0.0.2039

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,8 +98,7 @@ export declare class AssistsXAsync {
98
98
  * @param param0 识别参数
99
99
  * @returns 截图识别结果
100
100
  */
101
- static recognizeTextInScreenshot({ targetText, rotationDegrees, overlayHiddenScreenshotDelayMillis, restoreOverlay, region, timeout, }: {
102
- targetText: string;
101
+ static recognizeTextInScreenshot(targetText: string, options?: {
103
102
  rotationDegrees?: number;
104
103
  overlayHiddenScreenshotDelayMillis?: number;
105
104
  restoreOverlay?: boolean;
@@ -124,7 +124,8 @@ export class AssistsXAsync {
124
124
  * @param param0 识别参数
125
125
  * @returns 截图识别结果
126
126
  */
127
- static async recognizeTextInScreenshot({ targetText, rotationDegrees, overlayHiddenScreenshotDelayMillis, restoreOverlay = true, region, timeout, }) {
127
+ static async recognizeTextInScreenshot(targetText, options = {}) {
128
+ const { rotationDegrees = 0, overlayHiddenScreenshotDelayMillis = 250, restoreOverlay = true, region, timeout, } = options;
128
129
  const response = await this.asyncCall(CallMethod.recognizeTextInScreenshot, {
129
130
  args: {
130
131
  targetText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2037",
3
+ "version": "0.0.2039",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -206,21 +206,24 @@ export class AssistsXAsync {
206
206
  * @param param0 识别参数
207
207
  * @returns 截图识别结果
208
208
  */
209
- public static async recognizeTextInScreenshot({
210
- targetText,
211
- rotationDegrees,
212
- overlayHiddenScreenshotDelayMillis,
213
- restoreOverlay = true,
214
- region,
215
- timeout,
216
- }: {
217
- targetText: string;
218
- rotationDegrees?: number;
219
- overlayHiddenScreenshotDelayMillis?: number;
220
- restoreOverlay?: boolean;
221
- region?: RecognizeTextRegion;
222
- timeout?: number;
223
- }): Promise<RecognizeTextInScreenshotResult> {
209
+ public static async recognizeTextInScreenshot(
210
+ targetText: string,
211
+ options: {
212
+ rotationDegrees?: number;
213
+ overlayHiddenScreenshotDelayMillis?: number;
214
+ restoreOverlay?: boolean;
215
+ region?: RecognizeTextRegion;
216
+ timeout?: number;
217
+ } = {}
218
+ ): Promise<RecognizeTextInScreenshotResult> {
219
+ const {
220
+ rotationDegrees = 0,
221
+ overlayHiddenScreenshotDelayMillis = 250,
222
+ restoreOverlay = true,
223
+ region,
224
+ timeout,
225
+ } = options;
226
+
224
227
  const response = await this.asyncCall(
225
228
  CallMethod.recognizeTextInScreenshot,
226
229
  {