elysia 0.7.17 → 0.7.18

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/0.7.7 ADDED
File without changes
@@ -757,13 +757,13 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
757
757
  * })
758
758
  * ```
759
759
  */
760
- route<const Method extends HTTPMethod, const Paths extends Readonly<string[]>, const LocalSchema extends InputSchema<Extract<keyof Definitions['type'], string>>, const Function extends Handler<Route, Decorators, `${BasePath}${Paths[number]}`>, const Route extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['type']>, ParentSchema>>(method: Method, path: Paths, handler: Function, { config, ...hook }?: LocalHook<LocalSchema, Route, Decorators, Definitions['error'], `${BasePath}${Paths[number]}`> & {
760
+ route<const Method extends HTTPMethod, const Path extends string, const LocalSchema extends InputSchema<Extract<keyof Definitions['type'], string>>, const Function extends Handler<Route, Decorators, `${BasePath}${Path}`>, const Route extends MergeSchema<UnwrapRoute<LocalSchema, Definitions['type']>, ParentSchema>>(method: Method, path: Path, handler: Function, { config, ...hook }?: LocalHook<LocalSchema, Route, Decorators, Definitions['error'], `${BasePath}${Path}`> & {
761
761
  config: {
762
762
  allowMeta?: boolean;
763
763
  };
764
764
  }): Elysia<BasePath, Decorators, Definitions, ParentSchema, Prettify<Routes & {
765
- [path in `${BasePath}${Paths[number]}`]: {
766
- [method in HTTPMethod]: Route extends {
765
+ [path in `${BasePath}${Path}`]: {
766
+ [method in Lowercase<Method>]: Route extends {
767
767
  body: infer Body;
768
768
  params: infer Params;
769
769
  query: infer Query;