@xylink/xy-rtc-sdk 3.9.11-private.5 → 3.9.11

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.
@@ -4,37 +4,34 @@
4
4
  * Created at : 2023-04-19 09:46:28
5
5
  * Last modified : 2023-04-25 16:54:44
6
6
  */
7
- type AsyncFn<T> = (...args: any[]) => Promise<T>;
8
- declare class Queue<T> {
9
- private isRunning;
7
+ type Fn = (...args: any[]) => any;
8
+ declare class Queue {
9
+ private isLock;
10
10
  private taskCompletedCB;
11
11
  private waitingQueue;
12
- constructor();
12
+ constructor(isLock?: boolean);
13
13
  /**
14
14
  * 监听任务执行完成状态
15
15
  *
16
- * @param { (() => void) | null } callback - 任务结束回调
16
+ * @param { Fn } callback - 任务结束回调
17
17
  */
18
- onTaskCompleted(callback: () => void): void;
18
+ onTaskCompleted(callback: Fn): void;
19
19
  /**
20
- * 添加同步任务
20
+ * 添加任务
21
21
  *
22
- * @param { AsyncFn<T> } task - 同步任务函数
23
- * @returns { Promise<T> }
22
+ * @param { Fn } task - 任务函数
24
23
  */
25
- addTask(task: AsyncFn<T>): Promise<T>;
24
+ addTask(task: Fn): void;
26
25
  /**
27
- * 执行同步任务队列
26
+ * 执行任务队列
28
27
  *
29
- * @param { AsyncFn<T> } task - 同步任务函数
30
- * @param { Fn } resolve - Resolve函数
31
- * @param { Fn } reject - Reject函数
28
+ * @param { Fn} task - 无值时,执行所有任务
32
29
  */
33
- private execute;
30
+ execute(task?: Fn): void;
34
31
  /**
35
32
  * 获取执行中的任务数量
36
33
  *
37
- * @returns { number }
34
+ * @returns { number } - 任务队列长度
38
35
  */
39
36
  taskLength(): number;
40
37
  /**
@@ -17,3 +17,4 @@ export * from './peer';
17
17
  export * from './logger';
18
18
  export * from './iauth';
19
19
  export * from './polling';
20
+ export * from '../main/feature/vep/index.type';