Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
masx200 committed Aug 8, 2020
1 parent 54ab830 commit 580c15c
Show file tree
Hide file tree
Showing 9 changed files with 2,979 additions and 44 deletions.
73 changes: 39 additions & 34 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
type 空闲状态 = "free" | "full";
declare function createlimiter(max: number): AsyncCurrentLimiter;
interface AsyncCurrentLimiter {
[Symbol.toStringTag]: string;
asyncwrap: <T extends (...args: any[]) => Promise<any>>(fun: T) => T;
status: () => 空闲状态;
limiter: {
readonly max: number;
readonly current: number;
};
queue: {
readonly max: number;
readonly current: number;
};
target: import("@masx200/event-emitter-target").EventEmitterTarget;
}
interface statusdata {
status: 空闲状态;
queue: {
max: number;
current: number;
};
limiter: {
max: number;
current: number;
};
}
interface Constructor<T extends (...args: any[]) => any> {
new (...args: Parameters<T>): ReturnType<T>;
(...args: Parameters<T>): ReturnType<T>;
}
type AsyncLimiterConstructor = Constructor<typeof createlimiter>;
declare const _default: AsyncLimiterConstructor;
export { _default as default, AsyncLimiterConstructor, AsyncCurrentLimiter, statusdata };
type 空闲状态 = "free" | "full";
declare function createlimiter(max: number): AsyncCurrentLimiter;
interface AsyncCurrentLimiter {
[Symbol.toStringTag]: string;
asyncwrap: <T extends (...args: any[]) => Promise<any>>(fun: T) => T;
status: () => 空闲状态;
limiter: {
readonly max: number;
readonly current: number;
};
queue: {
readonly max: number;
readonly current: number;
};
target: import("@masx200/event-emitter-target").EventEmitterTarget;
}
interface statusdata {
status: 空闲状态;
queue: {
max: number;
current: number;
};
limiter: {
max: number;
current: number;
};
}
interface Constructor<T extends (...args: any[]) => any> {
new (...args: Parameters<T>): ReturnType<T>;
(...args: Parameters<T>): ReturnType<T>;
}
type AsyncLimiterConstructor = Constructor<typeof createlimiter>;
declare const _default: AsyncLimiterConstructor;
export {
_default as default,
AsyncLimiterConstructor,
AsyncCurrentLimiter,
statusdata,
};
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 580c15c

Please sign in to comment.