balda 0.0.46 → 0.0.48
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.
- package/lib/cli.js +31 -31
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs +24 -24
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +24 -24
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.cts
CHANGED
|
@@ -2258,7 +2258,7 @@ type TrustProxyOptions = {
|
|
|
2258
2258
|
*/
|
|
2259
2259
|
type NextFunction = () => SyncOrAsync;
|
|
2260
2260
|
|
|
2261
|
-
type ServerHandlerReturnType = any | Promise<
|
|
2261
|
+
type ServerHandlerReturnType<TResponseMap extends Record<number, any> = Record<number, any>> = void | Promise<void> | ResponseBodyForStatus<TResponseMap, 200> | Promise<ResponseBodyForStatus<TResponseMap, 200>>;
|
|
2262
2262
|
type ServerPlugin = {
|
|
2263
2263
|
bodyParser?: BodyParserOptions;
|
|
2264
2264
|
cors?: CorsOptions;
|
|
@@ -2579,7 +2579,7 @@ type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Re
|
|
|
2579
2579
|
};
|
|
2580
2580
|
type ServerHook = () => SyncOrAsync;
|
|
2581
2581
|
type SignalEvent = Deno.Signal | NodeJS.Signals;
|
|
2582
|
-
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType
|
|
2582
|
+
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType<InferResponseMap<TResponses>>;
|
|
2583
2583
|
|
|
2584
2584
|
type RunTimeType = "bun" | "node" | "deno";
|
|
2585
2585
|
|
package/lib/index.d.ts
CHANGED
|
@@ -2258,7 +2258,7 @@ type TrustProxyOptions = {
|
|
|
2258
2258
|
*/
|
|
2259
2259
|
type NextFunction = () => SyncOrAsync;
|
|
2260
2260
|
|
|
2261
|
-
type ServerHandlerReturnType = any | Promise<
|
|
2261
|
+
type ServerHandlerReturnType<TResponseMap extends Record<number, any> = Record<number, any>> = void | Promise<void> | ResponseBodyForStatus<TResponseMap, 200> | Promise<ResponseBodyForStatus<TResponseMap, 200>>;
|
|
2262
2262
|
type ServerPlugin = {
|
|
2263
2263
|
bodyParser?: BodyParserOptions;
|
|
2264
2264
|
cors?: CorsOptions;
|
|
@@ -2579,7 +2579,7 @@ type StandardMethodOptions<TResponses extends Record<number, RequestSchema> = Re
|
|
|
2579
2579
|
};
|
|
2580
2580
|
type ServerHook = () => SyncOrAsync;
|
|
2581
2581
|
type SignalEvent = Deno.Signal | NodeJS.Signals;
|
|
2582
|
-
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType
|
|
2582
|
+
type ControllerHandler<TPath extends string = string, TResponses extends Record<number, RequestSchema> = Record<number, RequestSchema>, TBody extends RequestSchema | unknown = unknown, TQuery extends RequestSchema | unknown = unknown, TAll extends RequestSchema | unknown = unknown> = (req: Request<ExtractParams<TPath>, TBody extends RequestSchema ? InferBodyType<TBody> : InferBodyType<TAll>, InferQueryType<TQuery> extends Record<string, any> ? InferQueryType<TQuery> : Record<string, unknown>>, res: Response$1<InferResponseMap<TResponses>>) => ServerHandlerReturnType<InferResponseMap<TResponses>>;
|
|
2583
2583
|
|
|
2584
2584
|
type RunTimeType = "bun" | "node" | "deno";
|
|
2585
2585
|
|