import { camelCase } from 'lodash/fp'; import { STATUS_CODES } from 'node:http'; /** * Single source of truth for the generated error helpers: yields one entry per * 4xx/5xx `node:http` status. Both the runtime registration (`koa.ts`) and the * type/runtime sync test iterate this, so they cannot drift. */ function* errorMethodEntries() { for (const [codeStr, statusName] of Object.entries(STATUS_CODES)){ const code = Number(codeStr); if (statusName && code >= 400 && code < 600) { yield { code, statusName, methodName: camelCase(statusName) }; } } } export { errorMethodEntries }; //# sourceMappingURL=koa-methods.mjs.map