Open miyaji255 opened 2 weeks ago
I'm using Typia on Hono, because Hono's query is Record<string, string[]>, so I can't use the http module. This PR allow a thin wrapper as query arguments. https://github.com/honojs/hono/blob/main/src/request.ts#L160
Record<string, string[]>
Thin wrapper example
const queries = c.req.queries(); const urlSearchParams: IReadableSearchParams = { get: queryName => queries[queryName][0] ?? null, getAll: queryName => queries[queryName] ?? [] }
Open in Stackblitz
npm i https://pkg.pr.new/typia@1349
commit: d00bce8
d00bce8
I'm using Typia on Hono, because Hono's query is
Record<string, string[]>
, so I can't use the http module. This PR allow a thin wrapper as query arguments. https://github.com/honojs/hono/blob/main/src/request.ts#L160Thin wrapper example