Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement more async utils #268

Open
tshemsedinov opened this issue Dec 11, 2024 · 4 comments
Open

Implement more async utils #268

tshemsedinov opened this issue Dec 11, 2024 · 4 comments
Assignees

Comments

@tshemsedinov
Copy link
Member

tshemsedinov commented Dec 11, 2024

type Callback = (err: Error | null, result: unknown) => void;
type AsyncFunction = (...args: unknown[]) => Promise<unknown>;

export function callbackify(fn: AsyncFunction): CallbackLast;
export function promisify(fn: CallbackLast): AsyncFunction;
export function debounce(fn: SyncFunction, delay: number): SyncFunction;
export function throttle(fn: SyncFunction, interval: number): SyncFunction;
@ArtemDmitrenko
Copy link

@tshemsedinov
May I implement these utils?

@tshemsedinov
Copy link
Member Author

@ArtemDmitrenko yes, please create branch from my branch async-utils and pull request from your to async-utils, so I'll land commits to async-utils and will release on next major release

@ArtemDmitrenko
Copy link

@tshemsedinov
As I can see these utils have been already added by you here
Correct?

@tshemsedinov
Copy link
Member Author

@ArtemDmitrenko This is a copy of the old code, it may be useful, but it needs some work, maybe there are inconvenient contracts, maybe the implementation can be optimized, need more tests, typings, docs, use cases...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants