koa-tree-router
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -33,43 +33,47 @@ import * as Koa from "koa"; | ||
*/ | ||
on(method: string, path: string, ...middleware: Array<Router.IMiddleware>); | ||
on( | ||
method: string, | ||
path: string, | ||
...middleware: Array<Router.IMiddleware> | ||
): this; | ||
/** | ||
* HTTP GET method | ||
*/ | ||
get(path: string, ...middleware: Array<Router.IMiddleware>); | ||
get(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP POST method | ||
*/ | ||
post(path: string, ...middleware: Array<Router.IMiddleware>); | ||
post(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP PUT method | ||
*/ | ||
put(path: string, ...middleware: Array<Router.IMiddleware>); | ||
put(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP DELETE method | ||
*/ | ||
delete(path: string, ...middleware: Array<Router.IMiddleware>); | ||
delete(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP HEAD method | ||
*/ | ||
head(path: string, ...middleware: Array<Router.IMiddleware>); | ||
head(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP OPTIONS method | ||
*/ | ||
options(path: string, ...middleware: Array<Router.IMiddleware>); | ||
options(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP PATCH method | ||
*/ | ||
patch(path: string, ...middleware: Array<Router.IMiddleware>); | ||
patch(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP TRACE method | ||
*/ | ||
trace(path: string, ...middleware: Array<Router.IMiddleware>); | ||
trace(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* HTTP CONNECT method | ||
*/ | ||
connect(path: string, ...middleware: Array<Router.IMiddleware>); | ||
connect(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
* Register route with all methods. | ||
*/ | ||
all(path: string, ...middleware: Array<Router.IMiddleware>); | ||
all(path: string, ...middleware: Array<Router.IMiddleware>): this; | ||
/** | ||
@@ -76,0 +80,0 @@ * Returns router middleware. |
{ | ||
"name": "koa-tree-router", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A high performance koa router", | ||
@@ -5,0 +5,0 @@ "main": "router.js", |
@@ -86,2 +86,4 @@ const compose = require("koa-compose"); | ||
}); | ||
return this; | ||
}; | ||
@@ -88,0 +90,0 @@ |
21612
576