import { c as RequestHandler } from './types-xEg9liKj.js'; import { S as Strip, M as MergeObjectsShallow } from './util-CHs1TI3T.js'; import { InferTypeof, TypeKey } from './util.js'; import 'midwinter'; type InferConfig = THandler extends RequestHandler ? Strip<{ Query: InferTypeof<$Meta[TypeKey<"Query_In">]>; Params: $Meta["params"] extends string[] ? MergeObjectsShallow<{ [Key in $Meta["params"][number]]: string; }, InferTypeof<$Meta[TypeKey<"Params_In">], {}>> : InferTypeof<$Meta[TypeKey<"Params_In">]>; Body: InferTypeof<$Meta[TypeKey<"Body_In">]>; Output: InferTypeof<$Meta[TypeKey<"Output_Out">]>; }, never> : never; type FormatMethod = T extends "*" ? string : T; type InferMethod = THandler extends RequestHandler ? $Meta["method"] extends string ? FormatMethod<$Meta["method"]> : $Meta["method"] extends string[] ? FormatMethod<$Meta["method"][number]> : never : never; type InferPath = THandler["meta"]["path"] extends string ? THandler["meta"]["path"] : never; type InferAppInput = Record; type InferApp = { [Key in keyof TInput as `${Uppercase>} ${InferPath}`]: InferConfig; }; export type { FormatMethod, InferApp, InferAppInput, InferConfig, InferMethod, InferPath };