Merge pull request #17328 from DerKnerd/patch-1

Update index.d.ts in page
This commit is contained in:
Nathan Shively-Sanders
2017-06-20 15:15:07 -07:00
committed by GitHub

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