mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 22:44:18 +08:00
Update index.d.ts
Added definition for RegExp
This commit is contained in:
11
types/page/index.d.ts
vendored
11
types/page/index.d.ts
vendored
@@ -26,6 +26,17 @@ declare namespace PageJS {
|
||||
* Links that are not of the same origin are disregarded and will not be dispatched.
|
||||
*/
|
||||
(path: string, ...callbacks: Callback[]): void;
|
||||
/**
|
||||
* Defines a route mapping path to the given callback(s).
|
||||
*
|
||||
* page('/', user.list)
|
||||
* page('/user/:id', user.load, user.show)
|
||||
* page('/user/:id/edit', user.load, user.edit)
|
||||
* page('*', notfound)
|
||||
*
|
||||
* Links that are not of the same origin are disregarded and will not be dispatched.
|
||||
*/
|
||||
(path: RegExp, ...callbacks: Callback[]): void;
|
||||
/**
|
||||
* This is equivalent to page('*', callback) for generic "middleware".
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user