@stacksjs/bun-router 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -335,4 +335,17 @@ export declare const RequestHelpers: {
335
335
  */
336
336
  parseCookies: (cookieHeader: string) => Record<string, string>;
337
337
  };
338
+ /**
339
+ * `request.query`, built once per request.
340
+ *
341
+ * `EnhancedRequest` declares `query` as a non-optional
342
+ * `Record<string, string | string[]>`, and on the server path nothing ever
343
+ * assigned it - so `req.query.a` type-checked and then threw
344
+ * `undefined is not an object`. A declared property that does not exist is the
345
+ * worst version of a type-versus-runtime gap: not a wrong value, a 500.
346
+ *
347
+ * A repeated key (`?a=1&a=2`) becomes an array, which is what the declared type
348
+ * has always promised.
349
+ */
350
+ export declare function getParsedQuery(req: EnhancedRequest): Record<string, string | string[]>;
338
351
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/bun-router",
3
3
  "type": "module",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "description": "A fast, type-safe router for Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",