@fishka/express 0.9.21 → 0.9.22

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.
@@ -27,10 +27,10 @@ export interface RequestContext {
27
27
  * Get and validate a query parameter.
28
28
  * @param name - Name of the query parameter
29
29
  * @param validator - Optional validator. If not provided, returns the raw string value or undefined.
30
- * @returns Validated value of type T, or undefined if parameter is not present
30
+ * @returns Validated value of type T.
31
31
  * @throws {HttpError} 400 Bad Request if validation fails
32
32
  */
33
- query<T = string>(name: string, validator?: ParamValidator<T>): T | undefined;
33
+ query<T = string>(name: string, validator?: ParamValidator<T>): T;
34
34
  /**
35
35
  * Get and validate the request body.
36
36
  * @param validator - Validator function or object assertion
@@ -27,10 +27,10 @@ export interface RequestContext {
27
27
  * Get and validate a query parameter.
28
28
  * @param name - Name of the query parameter
29
29
  * @param validator - Optional validator. If not provided, returns the raw string value or undefined.
30
- * @returns Validated value of type T, or undefined if parameter is not present
30
+ * @returns Validated value of type T.
31
31
  * @throws {HttpError} 400 Bad Request if validation fails
32
32
  */
33
- query<T = string>(name: string, validator?: ParamValidator<T>): T | undefined;
33
+ query<T = string>(name: string, validator?: ParamValidator<T>): T;
34
34
  /**
35
35
  * Get and validate the request body.
36
36
  * @param validator - Validator function or object assertion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishka/express",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "description": "Express.js extension with built-in validation, and type safety",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",