Update index.d.ts

Added definition for RegExp
This commit is contained in:
Imanuel Ulbricht
2017-06-20 18:36:03 +02:00
committed by GitHub
parent f061992636
commit 598f523b9a

11
types/page/index.d.ts vendored
View File

@@ -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".
*/