|
1 | | -type 空闲状态 = "free" | "full"; |
2 | | -declare function createlimiter(max: number): AsyncCurrentLimiter; |
3 | | -interface AsyncCurrentLimiter { |
4 | | - [Symbol.toStringTag]: string; |
5 | | - asyncwrap: <T extends (...args: any[]) => Promise<any>>(fun: T) => T; |
6 | | - status: () => 空闲状态; |
7 | | - limiter: { |
8 | | - readonly max: number; |
9 | | - readonly current: number; |
10 | | - }; |
11 | | - queue: { |
12 | | - readonly max: number; |
13 | | - readonly current: number; |
14 | | - }; |
15 | | - target: import("@masx200/event-emitter-target").EventEmitterTarget; |
16 | | -} |
17 | | -interface statusdata { |
18 | | - status: 空闲状态; |
19 | | - queue: { |
20 | | - max: number; |
21 | | - current: number; |
22 | | - }; |
23 | | - limiter: { |
24 | | - max: number; |
25 | | - current: number; |
26 | | - }; |
27 | | -} |
28 | | -interface Constructor<T extends (...args: any[]) => any> { |
29 | | - new (...args: Parameters<T>): ReturnType<T>; |
30 | | - (...args: Parameters<T>): ReturnType<T>; |
31 | | -} |
32 | | -type AsyncLimiterConstructor = Constructor<typeof createlimiter>; |
33 | | -declare const _default: AsyncLimiterConstructor; |
34 | | -export { _default as default, AsyncLimiterConstructor, AsyncCurrentLimiter, statusdata }; |
| 1 | +type 空闲状态 = "free" | "full"; |
| 2 | +declare function createlimiter(max: number): AsyncCurrentLimiter; |
| 3 | +interface AsyncCurrentLimiter { |
| 4 | + [Symbol.toStringTag]: string; |
| 5 | + asyncwrap: <T extends (...args: any[]) => Promise<any>>(fun: T) => T; |
| 6 | + status: () => 空闲状态; |
| 7 | + limiter: { |
| 8 | + readonly max: number; |
| 9 | + readonly current: number; |
| 10 | + }; |
| 11 | + queue: { |
| 12 | + readonly max: number; |
| 13 | + readonly current: number; |
| 14 | + }; |
| 15 | + target: import("@masx200/event-emitter-target").EventEmitterTarget; |
| 16 | +} |
| 17 | +interface statusdata { |
| 18 | + status: 空闲状态; |
| 19 | + queue: { |
| 20 | + max: number; |
| 21 | + current: number; |
| 22 | + }; |
| 23 | + limiter: { |
| 24 | + max: number; |
| 25 | + current: number; |
| 26 | + }; |
| 27 | +} |
| 28 | +interface Constructor<T extends (...args: any[]) => any> { |
| 29 | + new (...args: Parameters<T>): ReturnType<T>; |
| 30 | + (...args: Parameters<T>): ReturnType<T>; |
| 31 | +} |
| 32 | +type AsyncLimiterConstructor = Constructor<typeof createlimiter>; |
| 33 | +declare const _default: AsyncLimiterConstructor; |
| 34 | +export { |
| 35 | + _default as default, |
| 36 | + AsyncLimiterConstructor, |
| 37 | + AsyncCurrentLimiter, |
| 38 | + statusdata, |
| 39 | +}; |
0 commit comments