mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Update Layer.paramNames, Add ParamName (#25135)
In recent version of koa-router paramNames aren't strings but objects. Added definition
This commit is contained in:
13
types/koa-router/index.d.ts
vendored
13
types/koa-router/index.d.ts
vendored
@@ -87,12 +87,23 @@ declare module Router {
|
||||
|
||||
}
|
||||
|
||||
declare class ParamName {
|
||||
asterisk: boolean;
|
||||
delimiter: string;
|
||||
name: string;
|
||||
optional: boolean;
|
||||
partial: boolean;
|
||||
pattern: string;
|
||||
prefix: string;
|
||||
repeat: string;
|
||||
}
|
||||
|
||||
declare class Layer {
|
||||
|
||||
opts: Layer.ILayerOptions;
|
||||
name: string;
|
||||
methods: string[];
|
||||
paramNames: string[];
|
||||
paramNames: ParamName[];
|
||||
stack: Router.IMiddleware[];
|
||||
regexp: RegExp;
|
||||
path: string;
|
||||
|
||||
Reference in New Issue
Block a user