@sourceregistry/node-webserver 1.6.6 → 1.7.0

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.
@@ -67,6 +67,8 @@ export declare class Router<Locals extends App.Locals = App.Locals> {
67
67
  OPTIONS<Path extends string>(path: Path, handler: RouteHandler<Path, Locals>, ...middlewares: Middleware<Path, any>[]): Router<Locals>;
68
68
  USE<Path extends string>(path: Path, handler: RouteHandler<Path, Locals>, ...middlewares: Middleware<Path, any>[]): Router<Locals>;
69
69
  action<Path extends string, OutputData extends Record<string, any> = Record<string, any>>(path: Path, handler: ActionHandler<Path, OutputData>, ...middlewares: Middleware<Path, any>[]): Router<Locals>;
70
+ use<InnerLocals extends App.Locals = App.Locals>(router: Router<InnerLocals>, ...middlewares: Middleware<string>[]): Router<Locals & InnerLocals>;
71
+ use<InnerLocals extends App.Locals = App.Locals>(input: readonly [Router<InnerLocals>, ...Middleware<string>[]]): Router<Locals & InnerLocals>;
70
72
  use<Prefix extends string, InnerLocals extends App.Locals = App.Locals>(input: readonly [Prefix, Router<InnerLocals>, ...Middleware<Prefix>[]]): Router<Locals & InnerLocals>;
71
73
  use<Prefix extends string, InnerLocals extends App.Locals = App.Locals>(prefix: Prefix, router: Router<InnerLocals>, ...middlewares: Middleware<Prefix>[]): Router<Locals & InnerLocals>;
72
74
  useMiddleware<NewLocals extends App.Locals = App.Locals>(...mw: Middleware<string, NewLocals>[]): Router<Locals & NewLocals>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sourceregistry/node-webserver",
3
- "version": "1.6.6",
3
+ "version": "1.7.0",
4
4
  "description": "TypeScript web server for Node.js with web-standard Request and Response APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",