assistsx-js 0.0.2016 → 0.0.2017

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.
@@ -32,7 +32,7 @@ export interface AccessibilityEventFilterConfig {
32
32
  * 如果为空,则处理所有类型的事件
33
33
  * 如果指定类型,则只处理指定类型的事件
34
34
  */
35
- eventTypes?: Set<number> | null;
35
+ eventTypes?: number[] | null;
36
36
  /**
37
37
  * 是否启用事件去重
38
38
  * true: 启用去重,避免重复处理相同事件
@@ -64,7 +64,7 @@ export declare class AccessibilityEventFilter {
64
64
  /**
65
65
  * 事件类型过滤
66
66
  */
67
- readonly eventTypes: Set<number> | null;
67
+ readonly eventTypes: number[] | null;
68
68
  /**
69
69
  * 是否启用事件去重
70
70
  */
@@ -26,7 +26,7 @@ export class AccessibilityEventFilter {
26
26
  * @returns true表示应该处理,false表示应该过滤
27
27
  */
28
28
  shouldProcessEventType(eventType) {
29
- return this.eventTypes === null || this.eventTypes.has(eventType);
29
+ return this.eventTypes === null || this.eventTypes.includes(eventType);
30
30
  }
31
31
  /**
32
32
  * 创建默认的过滤配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistsx-js",
3
- "version": "0.0.2016",
3
+ "version": "0.0.2017",
4
4
  "description": "assistsx-js自动化开发SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -36,7 +36,7 @@ export interface AccessibilityEventFilterConfig {
36
36
  * 如果为空,则处理所有类型的事件
37
37
  * 如果指定类型,则只处理指定类型的事件
38
38
  */
39
- eventTypes?: Set<number> | null;
39
+ eventTypes?: number[] | null;
40
40
 
41
41
  /**
42
42
  * 是否启用事件去重
@@ -74,7 +74,7 @@ export class AccessibilityEventFilter {
74
74
  /**
75
75
  * 事件类型过滤
76
76
  */
77
- public readonly eventTypes: Set<number> | null;
77
+ public readonly eventTypes: number[] | null;
78
78
 
79
79
  /**
80
80
  * 是否启用事件去重
@@ -105,7 +105,7 @@ export class AccessibilityEventFilter {
105
105
  * @returns true表示应该处理,false表示应该过滤
106
106
  */
107
107
  public shouldProcessEventType(eventType: number): boolean {
108
- return this.eventTypes === null || this.eventTypes.has(eventType);
108
+ return this.eventTypes === null || this.eventTypes.includes(eventType);
109
109
  }
110
110
 
111
111
  /**