elysia 0.7.16 → 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
@@ -38,8 +38,10 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
38
38
  private getServer;
39
39
  private validator;
40
40
  private router;
41
+ private wsRouter;
41
42
  routes: InternalRoute[];
42
43
  private staticRouter;
44
+ private wsPaths;
43
45
  private dynamicRouter;
44
46
  private lazyLoadModules;
45
47
  path: BasePath;
@@ -755,13 +757,13 @@ export default class Elysia<BasePath extends string = '', Decorators extends Dec
755
757
  * })
756
758
  * ```
757
759
  */
758
- 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}`> & {
759
761
  config: {
760
762
  allowMeta?: boolean;
761
763
  };
762
764
  }): Elysia<BasePath, Decorators, Definitions, ParentSchema, Prettify<Routes & {
763
- [path in `${BasePath}${Paths[number]}`]: {
764
- [method in HTTPMethod]: Route extends {
765
+ [path in `${BasePath}${Path}`]: {
766
+ [method in Lowercase<Method>]: Route extends {
765
767
  body: infer Body;
766
768
  params: infer Params;
767
769
  query: infer Query;