(items: unknown[])
| 61 | } |
| 62 | |
| 63 | function countRecords(items: unknown[]) { |
| 64 | let records = 0 |
| 65 | for (const item of items) { |
| 66 | if (Boolean(item) && typeof item === "object" && !Array.isArray(item)) records++ |
| 67 | } |
| 68 | return records |
| 69 | } |
| 70 | |
| 71 | function json(status: number, body: Record<string, unknown>) { |
| 72 | return HttpServerResponse.json(body, { status }).pipe(Effect.orDie) |