You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a queue to limit the concurrency for API calls in different functions that have different types, so the following doesn't work for us (simplified for example purposes):
constlimit=promiseLimit<number|string>(2);limit(1)// Argument of type 'number' is not assignable to parameter of type '() => Promise<string | number>'
I would like to keep a single queue for all my functions because all of them performs an API call, so I want to limit them.
For now I need to set the type to any, but we loose type safety while doing so. It would be nice to be able to define this type when calling the limit function like this:
I'm using a queue to limit the concurrency for API calls in different functions that have different types, so the following doesn't work for us (simplified for example purposes):
I would like to keep a single queue for all my functions because all of them performs an API call, so I want to limit them.
For now I need to set the type to
any
, but we loose type safety while doing so. It would be nice to be able to define this type when calling the limit function like this:The text was updated successfully, but these errors were encountered: