@bettergi/types 0.0.3 → 0.0.5

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/README.md CHANGED
@@ -1,21 +1,21 @@
1
- TypeScript type definitions for [Better Genshin Impact](https://github.com/babalae/better-genshin-impact) JavaScript scripts.
2
-
3
- ## Installation
4
-
5
- ```shell
6
- npm install --save-dev @bettergi/types
7
- ```
8
-
9
- ## Usage
10
-
11
- ```json
12
- {
13
- "compilerOptions": {
14
- "types": ["@bettergi/types"]
15
- }
16
- }
17
- ```
18
-
19
- ## Related Tools
20
-
21
- [@bettergi/create-script](https://www.npmjs.com/package/@bettergi/create-script)
1
+ TypeScript type definitions for [Better Genshin Impact](https://github.com/babalae/better-genshin-impact) JavaScript scripts.
2
+
3
+ ## Installation
4
+
5
+ ```shell
6
+ npm install --save-dev @bettergi/types
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ```json
12
+ {
13
+ "compilerOptions": {
14
+ "types": ["@bettergi/types"]
15
+ }
16
+ }
17
+ ```
18
+
19
+ ## Related Tools
20
+
21
+ [@bettergi/create-script](https://www.npmjs.com/package/@bettergi/create-script)
@@ -33,7 +33,11 @@ export interface ImageRegion extends Region {
33
33
  * @param successAction 识别成功回调
34
34
  * @param failAction 识别失败回调
35
35
  */
36
- find: (ro: RecognitionObject, successAction?: () => Region, failAction?: () => void) => Region;
36
+ find: (
37
+ ro: RecognitionObject,
38
+ successAction?: (region: Region) => void,
39
+ failAction?: () => void
40
+ ) => Region;
37
41
 
38
42
  /**
39
43
  * 在本区域内查找识别对象,返回所有找到的结果
@@ -44,7 +48,7 @@ export interface ImageRegion extends Region {
44
48
  */
45
49
  findMulti: (
46
50
  ro: RecognitionObject,
47
- successAction?: () => List<Region>,
51
+ successAction?: (regions: List<Region>) => void,
48
52
  failAction?: () => void
49
53
  ) => List<Region>;
50
54
  }
@@ -121,9 +121,10 @@ declare global {
121
121
 
122
122
  /**
123
123
  * 鼠标滚动
124
+ * @param scrollAmountInClicks - 滚动的点击数 正数向上滚动,负数向下滚动
124
125
  * @since 0.44.5
125
126
  */
126
- function verticalScroll(): void;
127
+ function verticalScroll(scrollAmountInClicks: number): void;
127
128
 
128
129
  /**
129
130
  * 捕获当前游戏窗口内容
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bettergi/types",
3
- "version": "0.0.3",
4
- "description": "TypeScript definitions for BetterGI Script",
3
+ "version": "0.0.5",
4
+ "description": "TypeScript Definitions for BetterGI JavaScript",
5
5
  "type": "module",
6
6
  "author": "Bread Grocery<https://github.com/breadgrocery>",
7
7
  "license": "MIT",
@@ -13,8 +13,12 @@
13
13
  "bugs": {
14
14
  "url": "https://github.com/breadgrocery/bettergi-script-toolchain/issues"
15
15
  },
16
- "homepage": "https://github.com/breadgrocery/bettergi-script-toolchain/tree/master/packages/types",
16
+ "homepage": "https://github.com/breadgrocery/bettergi-script-toolchain/tree/main/packages/types",
17
17
  "types": "index.d.ts",
18
+ "keywords": [
19
+ "bettergi",
20
+ "types"
21
+ ],
18
22
  "dependencies": {
19
23
  "mirada": "^0.0.15"
20
24
  }