@bettergi/types 0.1.15 → 0.1.16

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.
Files changed (34) hide show
  1. package/bindings/RealtimeTimer.d.ts +1 -1
  2. package/bindings/getAvatars.d.ts +3 -2
  3. package/package.json +1 -1
  4. package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
  5. package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +4 -3
  6. package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +20 -9
  7. package/types/BetterGenshinImpact/Core/Script/Dependence/Http.d.ts +1 -0
  8. package/types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts +1 -0
  9. package/types/BetterGenshinImpact/Core/Script/Dependence/LimitedFile.d.ts +12 -5
  10. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +63 -8
  11. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +4 -1
  12. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +62 -3
  13. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -4
  14. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +11 -9
  15. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +61 -0
  16. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +28 -2
  17. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +13 -6
  18. package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
  19. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -7
  20. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +13 -13
  21. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.d.ts +3 -3
  22. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScript.d.ts +3 -2
  23. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/Method.d.ts +63 -3
  24. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +4 -3
  25. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +1 -0
  26. package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +50 -0
  27. package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +2 -0
  28. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +5 -3
  29. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +6 -4
  30. package/types/BetterGenshinImpact/GameTask/Common/Job/CraftMaterialTask.d.ts +19 -2
  31. package/types/BetterGenshinImpact/GameTask/Common/Map/MapScriptNames.d.ts +9 -0
  32. package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +6 -7
  33. package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +18 -15
  34. package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
@@ -6,6 +6,65 @@ import type {
6
6
  import "../../../../System/Collections/Generic/IEnumerable";
7
7
  import "../../../../System/Collections/Generic/List";
8
8
 
9
+ /**
10
+ * 战斗策略脚本中的动作方法名或别名
11
+ * 与上游 `Method` 静态实例的 `Alias` 对齐;未知写法仍可经 `(string & {})` 传入
12
+ * @since 0.50.0
13
+ */
14
+ export type CombatMethodCode =
15
+ // Skill
16
+ | "skill"
17
+ | "e"
18
+ // Burst
19
+ | "burst"
20
+ | "q"
21
+ // Attack
22
+ | "attack"
23
+ | "普攻"
24
+ | "普通攻击"
25
+ // Charge
26
+ | "charge"
27
+ | "重击"
28
+ // Wait
29
+ | "wait"
30
+ | "after"
31
+ | "等待"
32
+ // Ready
33
+ | "ready"
34
+ | "完成"
35
+ // Check
36
+ | "check"
37
+ | "检测"
38
+ // Walk / 方向
39
+ | "walk"
40
+ | "行走"
41
+ | "w"
42
+ | "a"
43
+ | "s"
44
+ | "d"
45
+ // Aim(已注册静态成员;GetEnumByCode 的 Values 当前未 yield)
46
+ | "aim"
47
+ | "r"
48
+ | "瞄准"
49
+ // Dash / Jump
50
+ | "dash"
51
+ | "冲刺"
52
+ | "jump"
53
+ | "j"
54
+ | "跳跃"
55
+ // 宏
56
+ | "mousedown"
57
+ | "mouseup"
58
+ | "click"
59
+ | "moveby"
60
+ | "keydown"
61
+ | "keyup"
62
+ | "keypress"
63
+ | "scroll"
64
+ | "verticalscroll"
65
+ | "round"
66
+ | (string & {});
67
+
9
68
  /**
10
69
  * 战斗策略脚本中的动作方法
11
70
  * @since 0.50.0
@@ -17,12 +76,13 @@ export interface Method extends ClrHostValue {
17
76
  * 方法别名列表,脚本中可使用其中任一写法
18
77
  * @since 0.50.0
19
78
  */
20
- readonly alias: System.Collections.Generic.List<string>;
79
+ readonly alias: System.Collections.Generic.List<CombatMethodCode>;
21
80
  }
22
81
 
23
82
  declare global {
24
83
  namespace BetterGenshinImpact.GameTask.AutoFight.Script {
25
84
  type Method = import("./Method").Method;
85
+ type CombatMethodCode = import("./Method").CombatMethodCode;
26
86
  }
27
87
  }
28
88
 
@@ -32,7 +92,7 @@ export interface MethodHostType extends HostType<Method, ReferenceTypeTrait> {
32
92
  * @param alias 方法别名列表
33
93
  * @since 0.50.0
34
94
  */
35
- new (alias: System.Collections.Generic.List<string>): Method;
95
+ new (alias: System.Collections.Generic.List<CombatMethodCode>): Method;
36
96
  /**
37
97
  * 元素战技,别名含 `skill`、`e`
38
98
  * @since 0.50.0
@@ -165,7 +225,7 @@ export interface MethodHostType extends HostType<Method, ReferenceTypeTrait> {
165
225
  * @throws 方法名未知时抛出参数异常
166
226
  * @since 0.50.0
167
227
  */
168
- getEnumByCode(method: string): BetterGenshinImpact.GameTask.AutoFight.Script.Method;
228
+ getEnumByCode(method: CombatMethodCode): BetterGenshinImpact.GameTask.AutoFight.Script.Method;
169
229
  }
170
230
 
171
231
  export {};
@@ -8,6 +8,7 @@ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
8
8
  import "../../../System/ComponentModel/INotifyPropertyChanged";
9
9
  import "../../../System/ComponentModel/INotifyPropertyChanging";
10
10
  import "../AutoFight/AutoFightConfig";
11
+ import type { CombatStrategyName, PartySlotIndex } from "../AutoFight/AutoFightConfig";
11
12
 
12
13
  /**
13
14
  * 地脉花独立战斗配置
@@ -84,7 +85,7 @@ export interface AutoLeyLineOutcropFightConfig
84
85
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
85
86
  * @since 0.58.0
86
87
  */
87
- guardianAvatar: string;
88
+ guardianAvatar: PartySlotIndex;
88
89
  /**
89
90
  * 是否跳过盾奶位自身的战斗策略脚本
90
91
  * @since 0.58.0
@@ -116,10 +117,10 @@ export interface AutoLeyLineOutcropFightConfig
116
117
  */
117
118
  seekEnemyRotaryFactor: number;
118
119
  /**
119
- * 战斗策略名称
120
+ * 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
120
121
  * @since 0.58.0
121
122
  */
122
- strategyName: string;
123
+ strategyName: CombatStrategyName;
123
124
  /**
124
125
  * 是否启用游泳脱困检测
125
126
  * @since 0.58.0
@@ -145,6 +145,7 @@ export interface AutoLeyLineOutcropParam extends Omit<
145
145
  declare global {
146
146
  namespace BetterGenshinImpact.GameTask.AutoLeyLineOutcrop {
147
147
  type AutoLeyLineOutcropParam = import("./AutoLeyLineOutcropParam").AutoLeyLineOutcropParam;
148
+ type LeyLineOutcropType = import("./AutoLeyLineOutcropParam").LeyLineOutcropType;
148
149
  }
149
150
  }
150
151
 
@@ -23,6 +23,41 @@ export type MoveMode =
23
23
  | "swim" // 游泳
24
24
  | (string & {});
25
25
 
26
+ /**
27
+ * 路径追踪赶路模式(`PathingPartyConfig.TravelMode`)
28
+ * 上游 UI 列表为 `精准靠近` / `连续赶路`;空串运行时会回退为 `精准靠近`
29
+ * @since 0.43.1
30
+ */
31
+ export type TravelMode =
32
+ | "精准靠近" // 适合采集,节点间减速
33
+ | "连续赶路" // 适合锄地
34
+ | (string & {});
35
+
36
+ /**
37
+ * 路径追踪队伍角色槽位序号(字符串)
38
+ * 上游 `PathingPartyConfig.AvatarIndexList`:`""` / `1`–`4`
39
+ * 用于 `MainAvatarIndex`、`GuardianAvatarIndex` 等
40
+ * @since 0.43.1
41
+ */
42
+ export type MainAvatarIndex = "" | "1" | "2" | "3" | "4" | (string & {});
43
+
44
+ /**
45
+ * 路径追踪自动赶路角色
46
+ * 上游 `PathingPartyConfig.HurryOnAvatarList`
47
+ * @since 0.43.1
48
+ */
49
+ export type HurryOnAvatar =
50
+ | "" // 未指定 / 关闭列表首项
51
+ | "自动" // 按名单与主C自动挑选
52
+ | "玛薇卡"
53
+ | "闲云"
54
+ | "桑多涅"
55
+ | "恰斯卡"
56
+ | "流浪者"
57
+ | "伊法"
58
+ | "希诺宁"
59
+ | (string & {});
60
+
26
61
  /**
27
62
  * 路径点到达动作
28
63
  * @since 0.43.1
@@ -79,4 +114,19 @@ export type MonsterTag =
79
114
  | "legendary" // 传奇
80
115
  | (string & {});
81
116
 
117
+ declare global {
118
+ namespace BetterGenshinImpact.GameTask.AutoPathing {
119
+ type HurryOnAvatar = import("./PathingScriptNames").HurryOnAvatar;
120
+ type MainAvatarIndex = import("./PathingScriptNames").MainAvatarIndex;
121
+ type MisidentificationHandlingMode =
122
+ import("./PathingScriptNames").MisidentificationHandlingMode;
123
+ type MisidentificationTriggerType = import("./PathingScriptNames").MisidentificationTriggerType;
124
+ type MonsterTag = import("./PathingScriptNames").MonsterTag;
125
+ type MoveMode = import("./PathingScriptNames").MoveMode;
126
+ type TravelMode = import("./PathingScriptNames").TravelMode;
127
+ type WaypointAction = import("./PathingScriptNames").WaypointAction;
128
+ type WaypointPointType = import("./PathingScriptNames").WaypointPointType;
129
+ }
130
+ }
131
+
82
132
  export {};
@@ -201,6 +201,8 @@ export interface AutoSkipConfig
201
201
  declare global {
202
202
  namespace BetterGenshinImpact.GameTask.AutoSkip {
203
203
  type AutoSkipConfig = import("./AutoSkipConfig").AutoSkipConfig;
204
+ type ClickChatOption = import("./AutoSkipConfig").ClickChatOption;
205
+ type PictureInPictureSourceType = import("./AutoSkipConfig").PictureInPictureSourceType;
204
206
  }
205
207
  }
206
208
 
@@ -7,6 +7,8 @@ import type {
7
7
  import "../../../System/Collections/Generic/List";
8
8
  import "../../../System/ComponentModel/INotifyPropertyChanged";
9
9
  import "../../../System/ComponentModel/INotifyPropertyChanging";
10
+ import type { ResinName } from "../AutoDomain/AutoDomainTask";
11
+ import type { CombatStrategyName } from "../AutoFight/AutoFightConfig";
10
12
 
11
13
  /**
12
14
  * 自动幽境危战配置
@@ -65,17 +67,17 @@ export interface AutoStygianOnslaughtConfig
65
67
  * 使用树脂的优先级列表,默认浓缩树脂优先于原粹树脂
66
68
  * @since 0.58.0
67
69
  */
68
- resinPriorityList: System.Collections.Generic.List<string>;
70
+ resinPriorityList: System.Collections.Generic.List<ResinName>;
69
71
  /**
70
72
  * 是否启用指定树脂使用次数模式
71
73
  * @since 0.58.0
72
74
  */
73
75
  specifyResinUse: boolean;
74
76
  /**
75
- * 战斗策略名称
77
+ * 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
76
78
  * @since 0.58.0
77
79
  */
78
- strategyName: string;
80
+ strategyName: CombatStrategyName;
79
81
  /**
80
82
  * 使用须臾树脂刷取的次数
81
83
  * @since 0.58.0
@@ -6,6 +6,8 @@ import type {
6
6
  } from "../../../Microsoft/ClearScript/HostType";
7
7
  import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
8
8
  import "../../../System/Collections/Generic/List";
9
+ import type { ResinName } from "../AutoDomain/AutoDomainTask";
10
+ import type { CombatStrategyName } from "../AutoFight/AutoFightConfig";
9
11
  import "../Model/BaseTaskParam";
10
12
  import "./AutoStygianOnslaughtConfig";
11
13
  import "./AutoStygianOnslaughtTask";
@@ -52,7 +54,7 @@ export interface AutoStygianOnslaughtParam extends Omit<
52
54
  * 使用树脂的优先级列表,默认浓缩树脂优先于原粹树脂
53
55
  * @since 0.58.0
54
56
  */
55
- resinPriorityList: System.Collections.Generic.List<string>;
57
+ resinPriorityList: System.Collections.Generic.List<ResinName>;
56
58
  /**
57
59
  * 使用原粹树脂刷取的次数
58
60
  * @since 0.58.0
@@ -104,8 +106,8 @@ export interface AutoStygianOnslaughtParam extends Omit<
104
106
  * @returns ClearScript 宿主空结果
105
107
  * @since 0.58.0
106
108
  */
107
- setResinPriorityList(priorities: HostArray<string>): VoidResult;
108
- setResinPriorityList(...priorities: string[]): VoidResult;
109
+ setResinPriorityList(priorities: HostArray<ResinName>): VoidResult;
110
+ setResinPriorityList(...priorities: ResinName[]): VoidResult;
109
111
  /**
110
112
  * 设置战斗策略路径
111
113
  * @param strategyName 策略名称,省略或为空时使用全局自动战斗配置中的策略名称
@@ -113,7 +115,7 @@ export interface AutoStygianOnslaughtParam extends Omit<
113
115
  * @since 0.58.0
114
116
  */
115
117
  setCombatStrategyPath(): VoidResult;
116
- setCombatStrategyPath(strategyName: string | null): VoidResult;
118
+ setCombatStrategyPath(strategyName: CombatStrategyName | null): VoidResult;
117
119
  }
118
120
 
119
121
  declare global {
@@ -9,6 +9,22 @@ import type {
9
9
  import "../../../../System/Collections/Generic/List";
10
10
  import "../Reward/RewardItem";
11
11
 
12
+ /**
13
+ * 合成台材料筛选类型
14
+ * 来源:`Assets/Model/ItemV2/item.csv` 的 `material_type` 去重集合
15
+ * @since 0.62.0
16
+ */
17
+ export type CraftMaterialType =
18
+ | "武器突破素材"
19
+ | "消耗品"
20
+ | "药剂"
21
+ | "角色与武器培养素材"
22
+ | "角色天赋素材"
23
+ | "角色突破素材"
24
+ | "食物"
25
+ | "鱼饵"
26
+ | (string & {});
27
+
12
28
  /**
13
29
  * 合成指定材料的执行结果
14
30
  * @since 0.62.0
@@ -40,7 +56,7 @@ export interface CraftMaterialResult extends ClrHostValue {
40
56
  * 本次使用的材料筛选类型
41
57
  * @since 0.62.0
42
58
  */
43
- materialType: string;
59
+ materialType: CraftMaterialType;
44
60
  /**
45
61
  * 本次合成产物汇总
46
62
  * @since 0.62.0
@@ -51,6 +67,7 @@ export interface CraftMaterialResult extends ClrHostValue {
51
67
  declare global {
52
68
  namespace BetterGenshinImpact.GameTask.Common.Job {
53
69
  type CraftMaterialResult = import("./CraftMaterialTask").CraftMaterialResult;
70
+ type CraftMaterialType = import("./CraftMaterialTask").CraftMaterialType;
54
71
  }
55
72
  }
56
73
 
@@ -77,7 +94,7 @@ export interface CraftMaterialResultHostType extends HostType<
77
94
  materialName: string,
78
95
  targetQuantity: number | StrongNumeric<Int32Host>,
79
96
  actualQuantity: number | StrongNumeric<Int32Host>,
80
- materialType: string,
97
+ materialType: CraftMaterialType,
81
98
  rewards: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Common.Reward.RewardItem>
82
99
  ): BetterGenshinImpact.GameTask.Common.Job.CraftMaterialResult;
83
100
  }
@@ -43,4 +43,13 @@ export type MapMatchMethod =
43
43
  | "SIFT" // SIFT 特征匹配
44
44
  | (string & {});
45
45
 
46
+ declare global {
47
+ namespace BetterGenshinImpact.GameTask.Common.Map {
48
+ type Area = import("./MapScriptNames").Area;
49
+ type CountryName = import("./MapScriptNames").CountryName;
50
+ type MapMatchMethod = import("./MapScriptNames").MapMatchMethod;
51
+ type MapName = import("./MapScriptNames").MapName;
52
+ }
53
+ }
54
+
46
55
  export {};
@@ -9,7 +9,6 @@ import type { VoidResult } from "../../../../Microsoft/ClearScript/VoidResult";
9
9
  import "../../../../OpenCvSharp/Mat";
10
10
  import "../../../../OpenCvSharp/Size";
11
11
  import "../../../../System/Drawing/Pen";
12
- import "../../../../System/Func";
13
12
  import "../../../../System/IDisposable";
14
13
  import "../../../../System/ValueTuple";
15
14
  import "../../../View/Drawable/DrawContent";
@@ -146,30 +145,30 @@ export interface GameCaptureRegionHostType extends HostType<GameCaptureRegion, R
146
145
  ): GameCaptureRegion;
147
146
  /**
148
147
  * 在游戏截图坐标系点击;回调参数为当前捕获尺寸与到 1080P 的缩放比,魔法数字须按 1080P 编写
149
- * @param posFunc 根据捕获尺寸与 1080P 缩放比计算点击坐标的回调
148
+ * @param posFunc 根据捕获尺寸与 1080P 缩放比计算点击坐标的脚本回调,返回坐标 ValueTuple 宿主对象
150
149
  * @returns ClearScript 宿主空结果
151
150
  * @since 0.43.1
152
151
  */
153
152
  gameRegionClick(
154
- posFunc: System.Func<OpenCvSharp.Size, number, System.ValueTuple<number, number>>
153
+ posFunc: (size: OpenCvSharp.Size, scale: number) => System.ValueTuple<number, number>
155
154
  ): VoidResult;
156
155
  /**
157
156
  * 在游戏截图坐标系移动鼠标;回调参数为当前捕获尺寸与到 1080P 的缩放比
158
- * @param posFunc 根据捕获尺寸与 1080P 缩放比计算目标坐标的回调
157
+ * @param posFunc 根据捕获尺寸与 1080P 缩放比计算目标坐标的脚本回调,返回坐标 ValueTuple 宿主对象
159
158
  * @returns ClearScript 宿主空结果
160
159
  * @since 0.43.1
161
160
  */
162
161
  gameRegionMove(
163
- posFunc: System.Func<OpenCvSharp.Size, number, System.ValueTuple<number, number>>
162
+ posFunc: (size: OpenCvSharp.Size, scale: number) => System.ValueTuple<number, number>
164
163
  ): VoidResult;
165
164
  /**
166
165
  * 在游戏截图坐标系按偏移移动鼠标;回调参数为当前捕获尺寸与到 1080P 的缩放比
167
- * @param deltaFunc 根据捕获尺寸与 1080P 缩放比计算偏移量的回调
166
+ * @param deltaFunc 根据捕获尺寸与 1080P 缩放比计算偏移量的脚本回调,返回偏移 ValueTuple 宿主对象
168
167
  * @returns ClearScript 宿主空结果
169
168
  * @since 0.43.1
170
169
  */
171
170
  gameRegionMoveBy(
172
- deltaFunc: System.Func<OpenCvSharp.Size, number, System.ValueTuple<number, number>>
171
+ deltaFunc: (size: OpenCvSharp.Size, scale: number) => System.ValueTuple<number, number>
173
172
  ): VoidResult;
174
173
  /**
175
174
  * 按 1080P 坐标点击,自动换算到当前捕获分辨率
@@ -10,7 +10,6 @@ import "../../../../OpenCvSharp/Mat";
10
10
  import "../../../../OpenCvSharp/Rect";
11
11
  import "../../../../SixLabors/ImageSharp/Image";
12
12
  import "../../../../SixLabors/ImageSharp/PixelFormats/Rgb24";
13
- import "../../../../System/Action";
14
13
  import "../../../../System/Collections/Generic/List";
15
14
  import "../../../../System/IDisposable";
16
15
  import "../../../Core/Recognition/RecognitionObject";
@@ -83,8 +82,8 @@ export interface ImageRegion
83
82
  /**
84
83
  * 在本区域内查找最优识别结果;支持模板匹配、OCR 匹配与 OCR 识别
85
84
  * @param ro 识别对象
86
- * @param successAction 找到时的回调
87
- * @param failAction 未找到时的回调
85
+ * @param successAction 找到时的脚本回调
86
+ * @param failAction 未找到时的脚本回调
88
87
  * @returns 最优识别区域;未找到时为空区域
89
88
  * @since 0.43.1
90
89
  */
@@ -93,18 +92,18 @@ export interface ImageRegion
93
92
  ): BetterGenshinImpact.GameTask.Model.Area.Region;
94
93
  find(
95
94
  ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
96
- successAction: System.Action<BetterGenshinImpact.GameTask.Model.Area.Region> | null
95
+ successAction: ((region: BetterGenshinImpact.GameTask.Model.Area.Region) => void) | null
97
96
  ): BetterGenshinImpact.GameTask.Model.Area.Region;
98
97
  find(
99
98
  ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
100
- successAction: System.Action<BetterGenshinImpact.GameTask.Model.Area.Region> | null,
101
- failAction: System.Action | null
99
+ successAction: ((region: BetterGenshinImpact.GameTask.Model.Area.Region) => void) | null,
100
+ failAction: (() => void) | null
102
101
  ): BetterGenshinImpact.GameTask.Model.Area.Region;
103
102
  /**
104
103
  * 在本区域内查找全部识别结果;仅支持模板匹配与 OCR
105
104
  * @param ro 识别对象
106
- * @param successAction 找到时的回调
107
- * @param failAction 未找到时的回调
105
+ * @param successAction 找到时的脚本回调
106
+ * @param failAction 未找到时的脚本回调
108
107
  * @returns 识别区域列表,不含内嵌图像
109
108
  * @since 0.43.1
110
109
  */
@@ -113,16 +112,20 @@ export interface ImageRegion
113
112
  ): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
114
113
  findMulti(
115
114
  ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
116
- successAction: System.Action<
117
- System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
118
- > | null
115
+ successAction:
116
+ | ((
117
+ regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
118
+ ) => void)
119
+ | null
119
120
  ): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
120
121
  findMulti(
121
122
  ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
122
- successAction: System.Action<
123
- System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
124
- > | null,
125
- failAction: System.Action | null
123
+ successAction:
124
+ | ((
125
+ regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
126
+ ) => void)
127
+ | null,
128
+ failAction: (() => void) | null
126
129
  ): System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
127
130
  /**
128
131
  * 释放资源
@@ -223,4 +223,11 @@ export type Key =
223
223
  export type KeyCode =
224
224
  Uppercase<Key> | Lowercase<Key> | Uppercase<`VK_${Key}`> | Lowercase<`VK_${Key}`> | (string & {});
225
225
 
226
+ declare global {
227
+ namespace BetterGenshinImpact.Helpers {
228
+ type Key = import("./User32Helper").Key;
229
+ type KeyCode = import("./User32Helper").KeyCode;
230
+ }
231
+ }
232
+
226
233
  export {};