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.
- package/dist/AssistsXAsync.d.ts +1 -1
- package/dist/AssistsXAsync.js +2 -1
- package/package.json +1 -1
- package/src/AssistsXAsync.ts +10 -8
package/dist/AssistsXAsync.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export declare class AssistsXAsync {
|
|
|
98
98
|
* @param param0 识别参数
|
|
99
99
|
* @returns 截图识别结果
|
|
100
100
|
*/
|
|
101
|
-
static recognizeTextInScreenshot(targetText: string,
|
|
101
|
+
static recognizeTextInScreenshot(targetText: string, options?: {
|
|
102
102
|
rotationDegrees?: number;
|
|
103
103
|
overlayHiddenScreenshotDelayMillis?: number;
|
|
104
104
|
restoreOverlay?: boolean;
|
package/dist/AssistsXAsync.js
CHANGED
|
@@ -124,7 +124,8 @@ export class AssistsXAsync {
|
|
|
124
124
|
* @param param0 识别参数
|
|
125
125
|
* @returns 截图识别结果
|
|
126
126
|
*/
|
|
127
|
-
static async recognizeTextInScreenshot(targetText,
|
|
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
package/src/AssistsXAsync.ts
CHANGED
|
@@ -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
|
{
|