mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
Merge pull request #21250 from jackwilsdon/add-strict-option
koa-router: Add missing strict option to IRouterOptions
This commit is contained in:
14
types/koa-router/index.d.ts
vendored
14
types/koa-router/index.d.ts
vendored
@@ -34,15 +34,25 @@ declare module Router {
|
||||
|
||||
export interface IRouterOptions {
|
||||
/**
|
||||
* Router prefixes
|
||||
* Prefix for all routes.
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* HTTP verbs
|
||||
* Methods which should be supported by the router.
|
||||
*/
|
||||
methods?: string[];
|
||||
routerPath?: string;
|
||||
/**
|
||||
* Whether or not routing should be case-sensitive.
|
||||
*/
|
||||
sensitive?: boolean;
|
||||
/**
|
||||
* Whether or not routes should matched strictly.
|
||||
*
|
||||
* If strict matching is enabled, the trailing slash is taken into
|
||||
* account when matching routes.
|
||||
*/
|
||||
strict?: boolean;
|
||||
}
|
||||
|
||||
export interface IRouterContext extends Koa.Context {
|
||||
|
||||
Reference in New Issue
Block a user