RepoPilot

What types does the main pLimit function expect for its concurrency argument?

About sindresorhus/p-limit · 2 messages · last activity 6/8/2026

Question

What types does the main pLimit function expect for its concurrency argument?

RepoPilot

The repository data doesn't include the actual source implementation, so I can only refer to what the README documents: the concurrency argument accepts either a number (minimum 1) or an object with a concurrency property and optional rejectOnClear boolean.

FOLLOW_UPS:

  • What does the limit function return type?
  • How are activeCount and pendingCount properties calculated?
  • What error type does clearQueue reject with?

Want to ask your own question?

Open chat for sindresorhus/p-limit

Public Q&A. Generated by RepoPilot from the actual source of sindresorhus/p-limit. AI answers can be incomplete or stale — verify before relying on them.