assistsx-js 0.0.2038 → 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,7 +98,7 @@ export declare class AssistsXAsync {
98
98
  * @param param0 识别参数
99
99
  * @returns 截图识别结果
100
100
  */
101
- static recognizeTextInScreenshot(targetText: string, { rotationDegrees, overlayHiddenScreenshotDelayMillis, restoreOverlay, region, timeout, }: {
101
+ static recognizeTextInScreenshot(targetText: string, options?: {
102
102
  rotationDegrees?: number;
103
103
  overlayHiddenScreenshotDelayMillis?: number;
104
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.2038",
3
+ "version": "0.0.2039",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -208,20 +208,22 @@ export class AssistsXAsync {
208
208
  */
209
209
  public static async recognizeTextInScreenshot(
210
210
  targetText: string,
211
- {
212
- rotationDegrees,
213
- overlayHiddenScreenshotDelayMillis,
214
- restoreOverlay = true,
215
- region,
216
- timeout,
217
- }: {
211
+ options: {
218
212
  rotationDegrees?: number;
219
213
  overlayHiddenScreenshotDelayMillis?: number;
220
214
  restoreOverlay?: boolean;
221
215
  region?: RecognizeTextRegion;
222
216
  timeout?: number;
223
- }
217
+ } = {}
224
218
  ): Promise<RecognizeTextInScreenshotResult> {
219
+ const {
220
+ rotationDegrees = 0,
221
+ overlayHiddenScreenshotDelayMillis = 250,
222
+ restoreOverlay = true,
223
+ region,
224
+ timeout,
225
+ } = options;
226
+
225
227
  const response = await this.asyncCall(
226
228
  CallMethod.recognizeTextInScreenshot,
227
229
  {