{"record":{"id":"7b568e2298c2c6b4","repo":"oven-sh/bun","slug":"expected-concurrency-to-be-a-number-from-1-and-u","errorCode":null,"errorMessage":"Expected `concurrency` to be a number from 1 and up","messagePattern":"Expected `concurrency` to be a number from 1 and up","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"scripts/p-limit.mjs","lineNumber":107,"sourceCode":"          }\n        });\n      },\n    },\n  });\n\n  return generator;\n}\n\nexport function limitFunction(function_, option) {\n  const { concurrency } = option;\n  const limit = pLimit(concurrency);\n\n  return (...arguments_) => limit(() => function_(...arguments_));\n}\n\nfunction validateConcurrency(concurrency) {\n  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n    throw new TypeError(\"Expected `concurrency` to be a number from 1 and up\");\n  }\n}\n","sourceCodeStart":89,"sourceCodeEnd":110,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/p-limit.mjs#L89-L110","documentation":"Error \"Expected `concurrency` to be a number from 1 and up\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/p-limit.mjs:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}