1 | import { ComponentInstruction } from '../instruction';
|
2 | import { Url } from '../url_parser';
|
3 | import { RouteHandler } from './route_handlers/route_handler';
|
4 | import { GeneratedUrl, RoutePath } from './route_paths/route_path';
|
5 | export declare abstract class RouteMatch {
|
6 | }
|
7 | export declare class PathMatch extends RouteMatch {
|
8 | instruction: ComponentInstruction;
|
9 | remaining: Url;
|
10 | remainingAux: Url[];
|
11 | constructor(instruction: ComponentInstruction, remaining: Url, remainingAux: Url[]);
|
12 | }
|
13 | export declare class RedirectMatch extends RouteMatch {
|
14 | redirectTo: any[];
|
15 | specificity: any;
|
16 | constructor(redirectTo: any[], specificity: any);
|
17 | }
|
18 | export interface AbstractRule {
|
19 | hash: string;
|
20 | path: string;
|
21 | recognize(beginningSegment: Url): Promise<RouteMatch>;
|
22 | generate(params: {
|
23 | [key: string]: any;
|
24 | }): ComponentInstruction;
|
25 | }
|
26 | export declare class RedirectRule implements AbstractRule {
|
27 | private _pathRecognizer;
|
28 | redirectTo: any[];
|
29 | hash: string;
|
30 | constructor(_pathRecognizer: RoutePath, redirectTo: any[]);
|
31 | path: string;
|
32 | /**
|
33 | * Returns `null` or a `ParsedUrl` representing the new path to match
|
34 | */
|
35 | recognize(beginningSegment: Url): Promise<RouteMatch>;
|
36 | generate(params: {
|
37 | [key: string]: any;
|
38 | }): ComponentInstruction;
|
39 | }
|
40 | export declare class RouteRule implements AbstractRule {
|
41 | private _routePath;
|
42 | handler: RouteHandler;
|
43 | private _routeName;
|
44 | specificity: string;
|
45 | terminal: boolean;
|
46 | hash: string;
|
47 | private _cache;
|
48 | constructor(_routePath: RoutePath, handler: RouteHandler, _routeName: string);
|
49 | path: string;
|
50 | recognize(beginningSegment: Url): Promise<RouteMatch>;
|
51 | generate(params: {
|
52 | [key: string]: any;
|
53 | }): ComponentInstruction;
|
54 | generateComponentPathValues(params: {
|
55 | [key: string]: any;
|
56 | }): GeneratedUrl;
|
57 | private _getInstruction(urlPath, urlParams, params);
|
58 | }
|