mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
Restricting types for route-parser.
This commit is contained in:
committed by
Robert Buehler
parent
92cde1421d
commit
e5c7b40a2b
8
types/route-parser/index.d.ts
vendored
8
types/route-parser/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for route-parser 0.0
|
||||
// Type definitions for route-parser 0.1
|
||||
// Project: https://github.com/rcs/route-parser
|
||||
// Definitions by: Ian Ker-Seymer <https://github.com/ianks>
|
||||
// Definitions by: Ian Ker-Seymer <https://github.com/ianks>, Bob Buehler <https://github.com/bobbuehler>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare class Route {
|
||||
@@ -23,7 +23,7 @@ declare class Route {
|
||||
* var route = new Route('/:one/:two')
|
||||
* route.match('/foo/bar/') // -> {one: 'foo', two: 'bar'}
|
||||
*/
|
||||
match(pathname: string): { [i: string]: string } | boolean;
|
||||
match(pathname: string): { [i: string]: string } | false;
|
||||
|
||||
/**
|
||||
* Reverse a route specification to a path, returning false if it can't be
|
||||
@@ -32,7 +32,7 @@ declare class Route {
|
||||
* var route = new Route('/:one/:two')
|
||||
* route.reverse({one: 'foo', two: 'bar'}) -> '/foo/bar'
|
||||
*/
|
||||
reverse(params: { [i: string]: any } ): string | boolean;
|
||||
reverse(params: { [i: string]: any } ): string | false;
|
||||
}
|
||||
|
||||
declare namespace Route {}
|
||||
|
||||
Reference in New Issue
Block a user