@loozo/angular-router 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -11
- package/fesm2022/loozo-angular-router-_core.mjs +2 -2
- package/fesm2022/loozo-angular-router-_core.mjs.map +1 -1
- package/fesm2022/loozo-angular-router-_generated.mjs +13 -8
- package/fesm2022/loozo-angular-router-_generated.mjs.map +1 -1
- package/node/src/builders/application.js +17 -0
- package/node/src/generation/emit.js +40 -27
- package/node/src/generation/selectors.d.ts +1 -1
- package/node/src/generation/selectors.js +14 -49
- package/package.json +1 -1
- package/schemas/application.json +2 -1
- package/snippets/generated/destinations.generated.ts +50 -105
- package/snippets/generated/routes.generated.ts +4 -4
- package/snippets/src/routes/products/$productId/route.generated.ts +3 -2
- package/snippets/src/routes/reports/$reportId/route.generated.ts +3 -2
- package/snippets/src/routes/teams/$teamId/items/$id/inputs.ts +1 -1
- package/snippets/src/routes/teams/$teamId/items/$id/links.ts +1 -1
- package/snippets/src/routes/teams/$teamId/items/$id/route.generated.ts +3 -2
- package/snippets/src/routes/teams/$teamId/members/$memberId/route.generated.ts +3 -2
- package/snippets/src/routes/teams/$teamId/route.generated.ts +3 -2
- package/snippets/src/routes/teams/$teamId/route.ts +3 -0
- package/types/loozo-angular-router-_core.d.ts +30 -14
- package/types/loozo-angular-router-_generated.d.ts +36 -16
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// @loozo/angular-router routegen: owned destinations.generated.ts
|
|
2
2
|
import type { RouteSet, Handle as GeneratedHandle, Destination as GeneratedDestination } from '@loozo/angular-router/_generated';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import definition_products_$productId_route from "../src/routes/products/$productId/route.js";
|
|
4
|
+
import definition_reports_$reportId_route from "../src/routes/reports/$reportId/route.js";
|
|
5
|
+
import definition_teams_$teamId_items_$id_route from "../src/routes/teams/$teamId/items/$id/route.js";
|
|
6
|
+
import definition_teams_$teamId_members_$memberId_route from "../src/routes/teams/$teamId/members/$memberId/route.js";
|
|
7
|
+
import definition_teams_$teamId_old_items_$id_route from "../src/routes/teams/$teamId/old-items/$id/route.js";
|
|
8
|
+
import definition_teams_$teamId_route from "../src/routes/teams/$teamId/route.js";
|
|
9
9
|
|
|
10
10
|
export type Definitions = {
|
|
11
|
-
"src/routes/products/$productId/route.ts": typeof
|
|
12
|
-
"src/routes/reports/$reportId/route.ts": typeof
|
|
13
|
-
"src/routes/teams/$teamId/items/$id/route.ts": typeof
|
|
14
|
-
"src/routes/teams/$teamId/members/$memberId/route.ts": typeof
|
|
15
|
-
"src/routes/teams/$teamId/old-items/$id/route.ts": typeof
|
|
16
|
-
"src/routes/teams/$teamId/route.ts": typeof
|
|
11
|
+
"src/routes/products/$productId/route.ts": typeof definition_products_$productId_route;
|
|
12
|
+
"src/routes/reports/$reportId/route.ts": typeof definition_reports_$reportId_route;
|
|
13
|
+
"src/routes/teams/$teamId/items/$id/route.ts": typeof definition_teams_$teamId_items_$id_route;
|
|
14
|
+
"src/routes/teams/$teamId/members/$memberId/route.ts": typeof definition_teams_$teamId_members_$memberId_route;
|
|
15
|
+
"src/routes/teams/$teamId/old-items/$id/route.ts": typeof definition_teams_$teamId_old_items_$id_route;
|
|
16
|
+
"src/routes/teams/$teamId/route.ts": typeof definition_teams_$teamId_route;
|
|
17
17
|
};
|
|
18
18
|
declare const setIdentity: unique symbol;
|
|
19
19
|
export type AbsoluteTargets = {
|
|
@@ -24,103 +24,48 @@ export type AbsoluteTargets = {
|
|
|
24
24
|
"/teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
25
25
|
"/teams/$teamId": "src/routes/teams/$teamId/route.ts";
|
|
26
26
|
};
|
|
27
|
-
export type
|
|
28
|
-
"src/routes/
|
|
29
|
-
"
|
|
30
|
-
"../$productId": "src/routes/products/$productId/route.ts";
|
|
31
|
-
"../../products/$productId": "src/routes/products/$productId/route.ts";
|
|
32
|
-
"../../reports/$reportId": "src/routes/reports/$reportId/route.ts";
|
|
33
|
-
"../../teams/$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
34
|
-
"../../teams/$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
35
|
-
"../../teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
36
|
-
"../../teams/$teamId": "src/routes/teams/$teamId/route.ts";
|
|
27
|
+
export type Parents = {
|
|
28
|
+
"src/routes/teams/$teamId/items/$id/route.ts": "src/routes/teams/$teamId/route.ts";
|
|
29
|
+
"src/routes/teams/$teamId/members/$memberId/route.ts": "src/routes/teams/$teamId/route.ts";
|
|
37
30
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"src/routes/teams/$teamId/items/$id/route.ts": {
|
|
49
|
-
"./": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
50
|
-
"../$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
51
|
-
"../../items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
52
|
-
"../../members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
53
|
-
"../../old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
54
|
-
"../..": "src/routes/teams/$teamId/route.ts";
|
|
55
|
-
"../../": "src/routes/teams/$teamId/route.ts";
|
|
56
|
-
"../../../$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
57
|
-
"../../../$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
58
|
-
"../../../$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
59
|
-
"../../../$teamId": "src/routes/teams/$teamId/route.ts";
|
|
60
|
-
"../../../../products/$productId": "src/routes/products/$productId/route.ts";
|
|
61
|
-
"../../../../reports/$reportId": "src/routes/reports/$reportId/route.ts";
|
|
62
|
-
"../../../../teams/$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
63
|
-
"../../../../teams/$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
64
|
-
"../../../../teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
65
|
-
"../../../../teams/$teamId": "src/routes/teams/$teamId/route.ts";
|
|
66
|
-
};
|
|
67
|
-
"src/routes/teams/$teamId/members/$memberId/route.ts": {
|
|
68
|
-
"./": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
69
|
-
"../$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
70
|
-
"../../items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
71
|
-
"../../members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
72
|
-
"../../old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
73
|
-
"../..": "src/routes/teams/$teamId/route.ts";
|
|
74
|
-
"../../": "src/routes/teams/$teamId/route.ts";
|
|
75
|
-
"../../../$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
76
|
-
"../../../$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
77
|
-
"../../../$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
78
|
-
"../../../$teamId": "src/routes/teams/$teamId/route.ts";
|
|
79
|
-
"../../../../products/$productId": "src/routes/products/$productId/route.ts";
|
|
80
|
-
"../../../../reports/$reportId": "src/routes/reports/$reportId/route.ts";
|
|
81
|
-
"../../../../teams/$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
82
|
-
"../../../../teams/$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
83
|
-
"../../../../teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
84
|
-
"../../../../teams/$teamId": "src/routes/teams/$teamId/route.ts";
|
|
85
|
-
};
|
|
86
|
-
"src/routes/teams/$teamId/route.ts": {
|
|
87
|
-
"./items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
88
|
-
"./members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
89
|
-
"./old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
90
|
-
"./": "src/routes/teams/$teamId/route.ts";
|
|
91
|
-
"../$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
92
|
-
"../$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
93
|
-
"../$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
94
|
-
"../$teamId": "src/routes/teams/$teamId/route.ts";
|
|
95
|
-
"../../products/$productId": "src/routes/products/$productId/route.ts";
|
|
96
|
-
"../../reports/$reportId": "src/routes/reports/$reportId/route.ts";
|
|
97
|
-
"../../teams/$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts";
|
|
98
|
-
"../../teams/$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts";
|
|
99
|
-
"../../teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts";
|
|
100
|
-
"../../teams/$teamId": "src/routes/teams/$teamId/route.ts";
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
export type Selected<Id extends keyof RelativeTargets> = {
|
|
104
|
-
readonly [Expression in keyof AbsoluteTargets | keyof RelativeTargets[Id]]:
|
|
105
|
-
Definitions[(Expression extends keyof AbsoluteTargets ? AbsoluteTargets[Expression] :
|
|
106
|
-
Expression extends keyof RelativeTargets[Id] ? RelativeTargets[Id][Expression] : never) & keyof Definitions];
|
|
31
|
+
/** Declarations with a colocated facade. */
|
|
32
|
+
export type Retained =
|
|
33
|
+
| "src/routes/products/$productId/route.ts"
|
|
34
|
+
| "src/routes/reports/$reportId/route.ts"
|
|
35
|
+
| "src/routes/teams/$teamId/items/$id/route.ts"
|
|
36
|
+
| "src/routes/teams/$teamId/members/$memberId/route.ts"
|
|
37
|
+
| "src/routes/teams/$teamId/route.ts"
|
|
38
|
+
;
|
|
39
|
+
export type AbsoluteSelected = {
|
|
40
|
+
readonly [Expression in keyof AbsoluteTargets]: Definitions[AbsoluteTargets[Expression] & keyof Definitions];
|
|
107
41
|
};
|
|
42
|
+
type ParentOf<Id extends Retained> = Id extends keyof Parents ? Definitions[Parents[Id] & keyof Definitions] : never;
|
|
108
43
|
/** A declaration-bound handle; obtain it through its colocated injectRoute facade. */
|
|
109
|
-
export type Handle<Id extends
|
|
44
|
+
export type Handle<Id extends Retained> = GeneratedHandle<Definitions[Id], AbsoluteSelected, ParentOf<Id>, typeof setIdentity, Pick<Definitions, Retained>>;
|
|
110
45
|
/** A same-set nominal reference; use the destination exported by a colocated facade. */
|
|
111
|
-
export type Destination<Id extends
|
|
46
|
+
export type Destination<Id extends Retained> = GeneratedDestination<Definitions[Id], typeof setIdentity, Id>;
|
|
112
47
|
const routeSet: RouteSet = { records: {
|
|
113
|
-
"src/routes/products/$productId/route.ts": { definition: () =>
|
|
114
|
-
"src/routes/reports/$reportId/route.ts": { definition: () =>
|
|
115
|
-
"src/routes/teams/$teamId/items/$id/route.ts": { definition: () =>
|
|
116
|
-
"src/routes/teams/$teamId/members/$memberId/route.ts": { definition: () =>
|
|
117
|
-
"src/routes/teams/$teamId/route.ts": { definition: () =>
|
|
48
|
+
"src/routes/products/$productId/route.ts": { definition: () => definition_products_$productId_route, owners: ["src/routes/products/$productId/route.ts"] },
|
|
49
|
+
"src/routes/reports/$reportId/route.ts": { definition: () => definition_reports_$reportId_route, owners: ["src/routes/reports/$reportId/route.ts"] },
|
|
50
|
+
"src/routes/teams/$teamId/items/$id/route.ts": { definition: () => definition_teams_$teamId_items_$id_route, owners: ["src/routes/teams/$teamId/route.ts","src/routes/teams/$teamId/items/$id/route.ts"] },
|
|
51
|
+
"src/routes/teams/$teamId/members/$memberId/route.ts": { definition: () => definition_teams_$teamId_members_$memberId_route, owners: ["src/routes/teams/$teamId/route.ts","src/routes/teams/$teamId/members/$memberId/route.ts"] },
|
|
52
|
+
"src/routes/teams/$teamId/route.ts": { definition: () => definition_teams_$teamId_route, owners: ["src/routes/teams/$teamId/route.ts"] },
|
|
118
53
|
}, destinations: {
|
|
119
|
-
"src/routes/products/$productId/route.ts": () =>
|
|
120
|
-
"src/routes/reports/$reportId/route.ts": () =>
|
|
121
|
-
"src/routes/teams/$teamId/items/$id/route.ts": () =>
|
|
122
|
-
"src/routes/teams/$teamId/members/$memberId/route.ts": () =>
|
|
123
|
-
"src/routes/teams/$teamId/old-items/$id/route.ts": () =>
|
|
124
|
-
"src/routes/teams/$teamId/route.ts": () =>
|
|
125
|
-
}, absolute: {
|
|
54
|
+
"src/routes/products/$productId/route.ts": () => definition_products_$productId_route,
|
|
55
|
+
"src/routes/reports/$reportId/route.ts": () => definition_reports_$reportId_route,
|
|
56
|
+
"src/routes/teams/$teamId/items/$id/route.ts": () => definition_teams_$teamId_items_$id_route,
|
|
57
|
+
"src/routes/teams/$teamId/members/$memberId/route.ts": () => definition_teams_$teamId_members_$memberId_route,
|
|
58
|
+
"src/routes/teams/$teamId/old-items/$id/route.ts": () => definition_teams_$teamId_old_items_$id_route,
|
|
59
|
+
"src/routes/teams/$teamId/route.ts": () => definition_teams_$teamId_route,
|
|
60
|
+
}, absolute: {
|
|
61
|
+
"/products/$productId": "src/routes/products/$productId/route.ts",
|
|
62
|
+
"/reports/$reportId": "src/routes/reports/$reportId/route.ts",
|
|
63
|
+
"/teams/$teamId/items/$id": "src/routes/teams/$teamId/items/$id/route.ts",
|
|
64
|
+
"/teams/$teamId/members/$memberId": "src/routes/teams/$teamId/members/$memberId/route.ts",
|
|
65
|
+
"/teams/$teamId/old-items/$id": "src/routes/teams/$teamId/old-items/$id/route.ts",
|
|
66
|
+
"/teams/$teamId": "src/routes/teams/$teamId/route.ts",
|
|
67
|
+
}, parents: {
|
|
68
|
+
"src/routes/teams/$teamId/items/$id/route.ts": "src/routes/teams/$teamId/route.ts",
|
|
69
|
+
"src/routes/teams/$teamId/members/$memberId/route.ts": "src/routes/teams/$teamId/route.ts",
|
|
70
|
+
} };
|
|
126
71
|
export function getRouteSet(): RouteSet { return routeSet; }
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { Routes } from '@angular/router';
|
|
3
3
|
import { getRouteSet } from './destinations.generated.js';
|
|
4
4
|
import { nativeOptions, callbacks, redirect } from '@loozo/angular-router/_generated';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import definition_teams_$teamId_items_$id_route from "../src/routes/teams/$teamId/items/$id/route.js";
|
|
6
|
+
import definition_teams_$teamId_old_items_$id_route from "../src/routes/teams/$teamId/old-items/$id/route.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Generated native Angular route configuration; install with provideRouter(routes).
|
|
@@ -12,7 +12,7 @@ import definition4 from "../src/routes/teams/$teamId/old-items/$id/route.js";
|
|
|
12
12
|
export const routes: Routes = [{ path: "teams/:teamId/old-items/:id",
|
|
13
13
|
pathMatch: 'full',
|
|
14
14
|
data: { __loozoAngularRouterRouteId: "src/routes/teams/$teamId/old-items/$id/route.ts" },
|
|
15
|
-
redirectTo: redirect(() =>
|
|
15
|
+
redirectTo: redirect(() => definition_teams_$teamId_old_items_$id_route) },
|
|
16
16
|
{ path: "products/:productId",
|
|
17
17
|
data: { __loozoAngularRouterRouteId: "src/routes/products/$productId/route.ts" },
|
|
18
18
|
...callbacks(getRouteSet(), "src/routes/products/$productId/route.ts"),
|
|
@@ -24,7 +24,7 @@ loadComponent: () => import("../src/routes/reports/$reportId/page") },
|
|
|
24
24
|
{ path: "teams/:teamId",
|
|
25
25
|
data: { __loozoAngularRouterRouteId: "src/routes/teams/$teamId/route.ts" },
|
|
26
26
|
...callbacks(getRouteSet(), "src/routes/teams/$teamId/route.ts"),
|
|
27
|
-
children: [{ ...nativeOptions(
|
|
27
|
+
children: [{ ...nativeOptions(definition_teams_$teamId_items_$id_route),
|
|
28
28
|
path: "items/:id",
|
|
29
29
|
data: { __loozoAngularRouterRouteId: "src/routes/teams/$teamId/items/$id/route.ts" },
|
|
30
30
|
...callbacks(getRouteSet(), "src/routes/teams/$teamId/items/$id/route.ts"),
|
|
@@ -7,14 +7,15 @@ export { defineRoute } from '@loozo/angular-router';
|
|
|
7
7
|
* No injection context is required; copies and foreign-set references are invalid.
|
|
8
8
|
* This is not an authored route and cannot be passed to the root createUrl function.
|
|
9
9
|
*/
|
|
10
|
-
export const destination: Destination<"src/routes/products/$productId/route.ts"> = createDestination(() => getRouteSet(), "src/routes/products/$productId/route.ts");
|
|
10
|
+
export const destination: Destination<"src/routes/products/$productId/route.ts"> = /* @__PURE__ */ createDestination(() => getRouteSet(), "src/routes/products/$productId/route.ts");
|
|
11
11
|
/**
|
|
12
12
|
* Injects a typed handle bound to this exact generated activated route record.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Call in an Angular injection context. The handle exposes readonly native
|
|
16
16
|
* params/search/data Signals and destination-typed link/navigate methods.
|
|
17
|
-
* Data
|
|
17
|
+
* Data holds the resolver results of this route and its ancestors, a nearer
|
|
18
|
+
* key hiding an ancestor's; native static data and the title stay out.
|
|
18
19
|
* All navigation values are explicit; current inputs are never reused implicitly.
|
|
19
20
|
*
|
|
20
21
|
* @returns A noncallable handle for this declaration.
|
|
@@ -7,14 +7,15 @@ export { defineRoute } from '@loozo/angular-router';
|
|
|
7
7
|
* No injection context is required; copies and foreign-set references are invalid.
|
|
8
8
|
* This is not an authored route and cannot be passed to the root createUrl function.
|
|
9
9
|
*/
|
|
10
|
-
export const destination: Destination<"src/routes/reports/$reportId/route.ts"> = createDestination(() => getRouteSet(), "src/routes/reports/$reportId/route.ts");
|
|
10
|
+
export const destination: Destination<"src/routes/reports/$reportId/route.ts"> = /* @__PURE__ */ createDestination(() => getRouteSet(), "src/routes/reports/$reportId/route.ts");
|
|
11
11
|
/**
|
|
12
12
|
* Injects a typed handle bound to this exact generated activated route record.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Call in an Angular injection context. The handle exposes readonly native
|
|
16
16
|
* params/search/data Signals and destination-typed link/navigate methods.
|
|
17
|
-
* Data
|
|
17
|
+
* Data holds the resolver results of this route and its ancestors, a nearer
|
|
18
|
+
* key hiding an ancestor's; native static data and the title stay out.
|
|
18
19
|
* All navigation values are explicit; current inputs are never reused implicitly.
|
|
19
20
|
*
|
|
20
21
|
* @returns A noncallable handle for this declaration.
|
|
@@ -10,6 +10,6 @@ export function readInputs() {
|
|
|
10
10
|
|
|
11
11
|
route.params(); // { teamId: number; id: number }
|
|
12
12
|
route.search(); // { score?: number }
|
|
13
|
-
route.data(); // { item: Item },
|
|
13
|
+
route.data(); // { team: { id: number; name: string }; item: Item }, ancestors' resolver results too
|
|
14
14
|
}
|
|
15
15
|
// #endregion inputs
|
|
@@ -8,6 +8,6 @@ export function itemLinks() {
|
|
|
8
8
|
route.link({ params: { teamId: 7, id: 8 } }); // this route
|
|
9
9
|
route.link(".", { params: { teamId: 7, id: 8 } }); // same as above
|
|
10
10
|
route.link("/teams/$teamId/items/$id", { params: { teamId: 7, id: 9 } }); // absolute
|
|
11
|
-
route.link("
|
|
11
|
+
route.link("..", { params: { teamId: 7 } }); // parent route
|
|
12
12
|
void route.navigate(report, { params: { reportId: 42 } }); // another route's destination
|
|
13
13
|
}
|
|
@@ -7,14 +7,15 @@ export { defineRoute } from '@loozo/angular-router';
|
|
|
7
7
|
* No injection context is required; copies and foreign-set references are invalid.
|
|
8
8
|
* This is not an authored route and cannot be passed to the root createUrl function.
|
|
9
9
|
*/
|
|
10
|
-
export const destination: Destination<"src/routes/teams/$teamId/items/$id/route.ts"> = createDestination(() => getRouteSet(), "src/routes/teams/$teamId/items/$id/route.ts");
|
|
10
|
+
export const destination: Destination<"src/routes/teams/$teamId/items/$id/route.ts"> = /* @__PURE__ */ createDestination(() => getRouteSet(), "src/routes/teams/$teamId/items/$id/route.ts");
|
|
11
11
|
/**
|
|
12
12
|
* Injects a typed handle bound to this exact generated activated route record.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Call in an Angular injection context. The handle exposes readonly native
|
|
16
16
|
* params/search/data Signals and destination-typed link/navigate methods.
|
|
17
|
-
* Data
|
|
17
|
+
* Data holds the resolver results of this route and its ancestors, a nearer
|
|
18
|
+
* key hiding an ancestor's; native static data and the title stay out.
|
|
18
19
|
* All navigation values are explicit; current inputs are never reused implicitly.
|
|
19
20
|
*
|
|
20
21
|
* @returns A noncallable handle for this declaration.
|
|
@@ -7,14 +7,15 @@ export { defineRoute } from '@loozo/angular-router';
|
|
|
7
7
|
* No injection context is required; copies and foreign-set references are invalid.
|
|
8
8
|
* This is not an authored route and cannot be passed to the root createUrl function.
|
|
9
9
|
*/
|
|
10
|
-
export const destination: Destination<"src/routes/teams/$teamId/members/$memberId/route.ts"> = createDestination(() => getRouteSet(), "src/routes/teams/$teamId/members/$memberId/route.ts");
|
|
10
|
+
export const destination: Destination<"src/routes/teams/$teamId/members/$memberId/route.ts"> = /* @__PURE__ */ createDestination(() => getRouteSet(), "src/routes/teams/$teamId/members/$memberId/route.ts");
|
|
11
11
|
/**
|
|
12
12
|
* Injects a typed handle bound to this exact generated activated route record.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Call in an Angular injection context. The handle exposes readonly native
|
|
16
16
|
* params/search/data Signals and destination-typed link/navigate methods.
|
|
17
|
-
* Data
|
|
17
|
+
* Data holds the resolver results of this route and its ancestors, a nearer
|
|
18
|
+
* key hiding an ancestor's; native static data and the title stay out.
|
|
18
19
|
* All navigation values are explicit; current inputs are never reused implicitly.
|
|
19
20
|
*
|
|
20
21
|
* @returns A noncallable handle for this declaration.
|
|
@@ -7,14 +7,15 @@ export { defineRoute } from '@loozo/angular-router';
|
|
|
7
7
|
* No injection context is required; copies and foreign-set references are invalid.
|
|
8
8
|
* This is not an authored route and cannot be passed to the root createUrl function.
|
|
9
9
|
*/
|
|
10
|
-
export const destination: Destination<"src/routes/teams/$teamId/route.ts"> = createDestination(() => getRouteSet(), "src/routes/teams/$teamId/route.ts");
|
|
10
|
+
export const destination: Destination<"src/routes/teams/$teamId/route.ts"> = /* @__PURE__ */ createDestination(() => getRouteSet(), "src/routes/teams/$teamId/route.ts");
|
|
11
11
|
/**
|
|
12
12
|
* Injects a typed handle bound to this exact generated activated route record.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Call in an Angular injection context. The handle exposes readonly native
|
|
16
16
|
* params/search/data Signals and destination-typed link/navigate methods.
|
|
17
|
-
* Data
|
|
17
|
+
* Data holds the resolver results of this route and its ancestors, a nearer
|
|
18
|
+
* key hiding an ancestor's; native static data and the title stay out.
|
|
18
19
|
* All navigation values are explicit; current inputs are never reused implicitly.
|
|
19
20
|
*
|
|
20
21
|
* @returns A noncallable handle for this declaration.
|
|
@@ -3,4 +3,7 @@ import { defineRoute, numberParam } from "@loozo/angular-router";
|
|
|
3
3
|
export default defineRoute("teams/$teamId", {
|
|
4
4
|
params: { teamId: numberParam },
|
|
5
5
|
search: { score: numberParam },
|
|
6
|
+
resolve: {
|
|
7
|
+
team: ({ params }) => ({ id: params.teamId, name: `Team ${params.teamId}` }),
|
|
8
|
+
},
|
|
6
9
|
});
|
|
@@ -165,8 +165,11 @@ declare const routeBrand: unique symbol;
|
|
|
165
165
|
* results and excludes Angular RedirectCommand values.
|
|
166
166
|
* @typeParam Fragments - This declaration's own allowed fragment-name union.
|
|
167
167
|
* @typeParam Catchall - Whether the declaration is a terminal catchall leaf.
|
|
168
|
+
* @typeParam Data - Effective resolver data: the ancestors' resolver results, then
|
|
169
|
+
* this declaration's own, a nearer key hiding an ancestor's key of the same name.
|
|
170
|
+
* Defaults to the local results alone.
|
|
168
171
|
*/
|
|
169
|
-
interface Route<Path extends string, Params, Search, Resolvers = {}, Fragments extends string = string, Catchall extends boolean = CatchallName<Path> extends never ? false : true
|
|
172
|
+
interface Route<Path extends string, Params, Search, Resolvers = {}, Fragments extends string = string, Catchall extends boolean = CatchallName<Path> extends never ? false : true, Data = LocalData<Resolvers>> {
|
|
170
173
|
/** Type-only nominal brand carrying fragment and catchall metadata; not populated at runtime. */
|
|
171
174
|
readonly [routeBrand]: {
|
|
172
175
|
/** Type-only: this declaration's own allowed fragment-name union. */
|
|
@@ -180,8 +183,8 @@ interface Route<Path extends string, Params, Search, Resolvers = {}, Fragments e
|
|
|
180
183
|
readonly __params?: Params;
|
|
181
184
|
/** Type-only witness for effective search values; not populated at runtime. */
|
|
182
185
|
readonly __search?: Search;
|
|
183
|
-
/** Type-only witness for unwrapped
|
|
184
|
-
readonly __data?:
|
|
186
|
+
/** Type-only witness for unwrapped effective resolver data, excluding redirects. */
|
|
187
|
+
readonly __data?: Data;
|
|
185
188
|
/** The snapshotted local resolver map, retaining original callback identities. */
|
|
186
189
|
readonly resolve?: Readonly<Resolvers>;
|
|
187
190
|
/** The original native rerun policy; omission preserves Angular's default. */
|
|
@@ -189,23 +192,34 @@ interface Route<Path extends string, Params, Search, Resolvers = {}, Fragments e
|
|
|
189
192
|
}
|
|
190
193
|
type Unwrap<Value> = Value extends Promise<infer Inner> | Observable<infer Inner> ? Unwrap<Inner> : Value;
|
|
191
194
|
type Resolved<Callback> = Callback extends ((...args: any[]) => infer Value) ? Exclude<Unwrap<Value>, RedirectCommand> : never;
|
|
192
|
-
type AnyRoute = Route<string, any, any, any, any, boolean>;
|
|
195
|
+
type AnyRoute = Route<string, any, any, any, any, boolean, any>;
|
|
193
196
|
/** Extracts a declaration's effective inherited and local path-value types. */
|
|
194
|
-
type ParamsOf<Target> = Target extends Route<string, infer Params, any, any, any, boolean> ? Params : {};
|
|
197
|
+
type ParamsOf<Target> = Target extends Route<string, infer Params, any, any, any, boolean, any> ? Params : {};
|
|
195
198
|
/** Extracts effective parsed search-value types; keys without a fallback are optional. */
|
|
196
|
-
type SearchOf<Target> = Target extends Route<string, any, infer Search, any, any, boolean> ? Search : {};
|
|
199
|
+
type SearchOf<Target> = Target extends Route<string, any, infer Search, any, any, boolean, any> ? Search : {};
|
|
197
200
|
/**
|
|
198
201
|
* Effective search values accepted by URL creation: every key may be omitted or
|
|
199
202
|
* `undefined`, and a supplied value has the key's codec type.
|
|
200
203
|
*/
|
|
201
204
|
type SearchInputOf<Target> = { readonly [Key in keyof SearchOf<Target>]?: SearchOf<Target>[Key] | undefined; };
|
|
202
205
|
/** Extracts only the selected declaration's own allowed fragment-name union. */
|
|
203
|
-
type FragmentsOf<Target> = Target extends Route<string, any, any, any, infer Fragments, boolean> ? Fragments : never;
|
|
206
|
+
type FragmentsOf<Target> = Target extends Route<string, any, any, any, infer Fragments, boolean, any> ? Fragments : never;
|
|
204
207
|
type CodecMap = Record<string, ParamCodec<any>>;
|
|
205
208
|
type LocalParams<Path extends string, Codecs> = { readonly [Key in keyof Codecs]: Key extends CatchallName<Path> ? readonly CodecValue<Codecs[Key]>[] : CodecValue<Codecs[Key]>; };
|
|
206
209
|
type SearchValues<Codecs> = { readonly [Key in keyof Codecs as HasFallback<Codecs[Key]> extends true ? Key : never]: CodecValue<Codecs[Key]>; } & { readonly [Key in keyof Codecs as HasFallback<Codecs[Key]> extends true ? never : Key]?: CodecValue<Codecs[Key]>; };
|
|
207
210
|
type EffectiveParams<Path extends string, Codecs, Parent> = ParamsOf<Parent> & LocalParams<Path, Codecs>;
|
|
208
211
|
type EffectiveSearch<Codecs, Parent> = SearchOf<Parent> & SearchValues<Codecs>;
|
|
212
|
+
/** Unwrapped results of a declaration's own resolvers, excluding redirects. */
|
|
213
|
+
type LocalData<Resolvers> = { readonly [Key in keyof Resolvers]: Resolved<Resolvers[Key]>; };
|
|
214
|
+
/**
|
|
215
|
+
* Resolver data of a declaration's whole chain: the parent's effective data with
|
|
216
|
+
* the local results laid over it, so a local key hides an inherited key of the same name.
|
|
217
|
+
*/
|
|
218
|
+
type EffectiveData<Resolvers, Parent> = Unshadowed<Parent extends {
|
|
219
|
+
readonly __data?: infer Data;
|
|
220
|
+
} ? Data : {}, keyof Resolvers> & LocalData<Resolvers>;
|
|
221
|
+
type KeyIdentity<Key> = Key extends number ? `${Key}` : Key;
|
|
222
|
+
type Unshadowed<Inherited, Local> = { readonly [Key in keyof Inherited as KeyIdentity<Key> extends KeyIdentity<Local> ? never : Key]: Inherited[Key]; };
|
|
209
223
|
/**
|
|
210
224
|
* Shared parsed inputs supplied to typed guards and resolvers.
|
|
211
225
|
* The container and maps are shallow-frozen; nested codec values remain opaque.
|
|
@@ -366,7 +380,7 @@ type Redirect<SourceParams, Target extends AnyRoute, SearchKeys extends keyof Se
|
|
|
366
380
|
*/
|
|
367
381
|
type RouteConfig<Path extends string, Parent extends AnyRoute | undefined, Params extends Record<string, PathCodec>, Search extends CodecMap, Resolvers, Fragments extends readonly string[], Target extends AnyRoute | undefined, ReplacementKeys extends keyof SearchOf<Target>> = {
|
|
368
382
|
/** Genuine authored parent; pathless nodes retain inherited input ownership. */
|
|
369
|
-
parent?: Parent & (Parent extends Route<string, any, any, any, any, true> ? never : unknown);
|
|
383
|
+
parent?: Parent & (Parent extends Route<string, any, any, any, any, true, any> ? never : unknown);
|
|
370
384
|
/** Local search codecs; a key is absent unless present and valid, or wrapped withFallback. */
|
|
371
385
|
search?: Search & Record<Extract<keyof Search, keyof SearchOf<Parent>>, never> & SyncCodecs<NoInfer<Search>>;
|
|
372
386
|
/** Local parsed-input resolvers; not snapshot-first native ResolveFn callbacks. */
|
|
@@ -435,8 +449,9 @@ export declare function routeMetadata(route: unknown): RouteMetadata;
|
|
|
435
449
|
* catchall. Repeated local scalar names reuse one value. Leading/trailing or
|
|
436
450
|
* repeated slashes, dot segments and Angular `:name`/wildcard notation are invalid.
|
|
437
451
|
*
|
|
438
|
-
* Parents compose effective params/search transitively,
|
|
439
|
-
* pathless nodes
|
|
452
|
+
* Parents compose effective params/search and resolver data transitively,
|
|
453
|
+
* including through pathless nodes; a local resolver key hides an inherited
|
|
454
|
+
* one. Children cannot redeclare ancestor-owned param or search keys or have a
|
|
440
455
|
* catchall parent. Fragment names belong only to this declaration.
|
|
441
456
|
* The route and copied containers are shallow-frozen; application codecs,
|
|
442
457
|
* callbacks, providers and opaque values retain identity and are not deep-frozen.
|
|
@@ -450,7 +465,7 @@ export declare function routeMetadata(route: unknown): RouteMetadata;
|
|
|
450
465
|
* @param config - Local codecs, parent, fragments and supported native behavior.
|
|
451
466
|
* Structural Angular options such as children, component and matcher are
|
|
452
467
|
* generator-owned and cannot be overridden.
|
|
453
|
-
* @returns A frozen route preserving inferred effective input and
|
|
468
|
+
* @returns A frozen route preserving inferred effective input and resolver data types.
|
|
454
469
|
* @throws TypeError for invalid paths/configuration, missing or extra local
|
|
455
470
|
* codecs, fallback codecs in path params, inherited key conflicts, or
|
|
456
471
|
* nongenuine parent/redirect routes.
|
|
@@ -464,7 +479,7 @@ export declare function routeMetadata(route: unknown): RouteMetadata;
|
|
|
464
479
|
* });
|
|
465
480
|
* ```
|
|
466
481
|
*/
|
|
467
|
-
export declare function defineRoute<const Path extends string, Parent extends AnyRoute | undefined = undefined, Params extends Record<string, PathCodec> = {}, Search extends CodecMap = {}, Resolvers extends Record<string, (...args: any[]) => unknown> = {}, const Fragments extends readonly string[] = [], Target extends AnyRoute | undefined = undefined, ReplacementKeys extends keyof SearchOf<NoInfer<Target>> = never>(path: Path & ValidPath<Path>, config: RouteConfig<Path, Parent, Params, Search, Resolvers, Fragments, Target, ReplacementKeys>): Route<Path, EffectiveParams<Path, Params, Parent>, EffectiveSearch<Search, Parent>, Resolvers, Fragments[number], CatchallName<Path> extends never ? false : true
|
|
482
|
+
export declare function defineRoute<const Path extends string, Parent extends AnyRoute | undefined = undefined, Params extends Record<string, PathCodec> = {}, Search extends CodecMap = {}, Resolvers extends Record<string, (...args: any[]) => unknown> = {}, const Fragments extends readonly string[] = [], Target extends AnyRoute | undefined = undefined, ReplacementKeys extends keyof SearchOf<NoInfer<Target>> = never>(path: Path & ValidPath<Path>, config: RouteConfig<Path, Parent, Params, Search, Resolvers, Fragments, Target, ReplacementKeys>): Route<Path, EffectiveParams<Path, Params, Parent>, EffectiveSearch<Search, Parent>, Resolvers, Fragments[number], CatchallName<Path> extends never ? false : true, EffectiveData<Resolvers, Parent>>;
|
|
468
483
|
/**
|
|
469
484
|
* Synchronously serializes a route's explicit values into a root-relative URL.
|
|
470
485
|
*
|
|
@@ -484,7 +499,8 @@ export declare function defineRoute<const Path extends string, Parent extends An
|
|
|
484
499
|
* not a generated destination, spread/copy or structural lookalike.
|
|
485
500
|
* @param values - Explicit destination-typed params, search and optional fragment.
|
|
486
501
|
* Pass an empty object when the route needs no values.
|
|
487
|
-
* @returns A root-relative URL string
|
|
502
|
+
* @returns A root-relative URL string, typed `` `/${string}` ``; this does not navigate or
|
|
503
|
+
* return a UrlTree.
|
|
488
504
|
* @throws TypeError for invalid routes/records, missing or unknown keys,
|
|
489
505
|
* undeclared fragments, nonarray catchalls, nonstring codec output, or empty/dot
|
|
490
506
|
* path output. Application stringifier failures propagate unchanged.
|
|
@@ -500,5 +516,5 @@ export declare function defineRoute<const Path extends string, Parent extends An
|
|
|
500
516
|
* // /products/42#summary
|
|
501
517
|
* ```
|
|
502
518
|
*/
|
|
503
|
-
export declare function createUrl<Target extends AnyRoute, SearchKeys extends keyof SearchOf<NoInfer<Target>> = never>(route: Target, values: UrlValues<NoInfer<Target>, SearchKeys>): string
|
|
519
|
+
export declare function createUrl<Target extends AnyRoute, SearchKeys extends keyof SearchOf<NoInfer<Target>> = never>(route: Target, values: UrlValues<NoInfer<Target>, SearchKeys>): `/${string}`;
|
|
504
520
|
export type { AnyRoute, FragmentsOf, Inputs, ParamCodec, ParamsOf, Route, RouteMetadata, SearchOf, UrlValues };
|
|
@@ -9,7 +9,7 @@ interface RouteSet {
|
|
|
9
9
|
readonly records: Readonly<Record<string, RecordBinding>>;
|
|
10
10
|
readonly destinations: Readonly<Record<string, () => AnyRoute>>;
|
|
11
11
|
readonly absolute: Readonly<Record<string, string>>;
|
|
12
|
-
readonly
|
|
12
|
+
readonly parents: Readonly<Record<string, string>>;
|
|
13
13
|
}
|
|
14
14
|
interface Parsed {
|
|
15
15
|
readonly params: Readonly<Record<string, unknown>>;
|
|
@@ -95,8 +95,9 @@ type IsUnion<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Va
|
|
|
95
95
|
* @remarks
|
|
96
96
|
* Obtain it in an Angular injection context for the exact generated activated
|
|
97
97
|
* record. Params, search and data are readonly Angular Signals of the route's
|
|
98
|
-
* committed snapshot, with values from the first read. Data
|
|
99
|
-
*
|
|
98
|
+
* committed snapshot, with values from the first read. Data holds the resolver
|
|
99
|
+
* results of the route's whole chain, ancestors first, a nearer key hiding an
|
|
100
|
+
* ancestor's key of the same name; native static data and the title stay out.
|
|
100
101
|
*
|
|
101
102
|
* While a navigation is pending, the signals keep the current snapshot's values;
|
|
102
103
|
* when a navigation commits a new snapshot for this route, all three change
|
|
@@ -106,14 +107,15 @@ type IsUnion<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Va
|
|
|
106
107
|
* rejects a value it accepted while matching, a programming error.
|
|
107
108
|
*
|
|
108
109
|
* Selectors are single known authored literals, not concrete URLs or string
|
|
109
|
-
* unions. `.` is exact-current;
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
110
|
+
* unions. `.` is exact-current; `..` selects the parent route: the nearest
|
|
111
|
+
* ancestor with a shorter path, or the root for a top-level route. It and
|
|
112
|
+
* absolute selectors use generated canonical targets. Every call supplies all
|
|
113
|
+
* target values; there is no current-value reuse, extras argument or implicit
|
|
114
|
+
* query merge.
|
|
114
115
|
*
|
|
115
116
|
* @typeParam Target - The bound declaration's schema.
|
|
116
|
-
* @typeParam
|
|
117
|
+
* @typeParam Absolute - Absolute literal selectors and their target schemas.
|
|
118
|
+
* @typeParam Parent - The `..` target's schema, or never when there is none.
|
|
117
119
|
* @typeParam Set - The generator's nominal route-set identity.
|
|
118
120
|
* @typeParam References - Exact declarations addressable by same-set references.
|
|
119
121
|
*
|
|
@@ -127,12 +129,12 @@ type IsUnion<Value, Whole = Value> = Value extends unknown ? [Whole] extends [Va
|
|
|
127
129
|
* // Bind link to Angular RouterLink, or call route.navigate with the same values.
|
|
128
130
|
* ```
|
|
129
131
|
*/
|
|
130
|
-
export interface Handle<Target extends AnyRoute,
|
|
132
|
+
export interface Handle<Target extends AnyRoute, Absolute extends Record<string, AnyRoute> = {}, Parent extends AnyRoute = never, Set = unknown, References extends Record<string, AnyRoute> = {}> {
|
|
131
133
|
/** Effective positional params of the committed snapshot; kept while a navigation is pending. */
|
|
132
134
|
readonly params: Signal<Readonly<ParamsOf<Target>>>;
|
|
133
135
|
/** Effective declared search, from the same snapshot as params; absent keys have no value or fallback. */
|
|
134
136
|
readonly search: Signal<Readonly<SearchOf<Target>>>;
|
|
135
|
-
/**
|
|
137
|
+
/** Effective resolver results of the route and its ancestors, from the same snapshot as params. */
|
|
136
138
|
readonly data: Signal<DataOf<Target>>;
|
|
137
139
|
/**
|
|
138
140
|
* Creates a native UrlTree for this exact declaration without navigating.
|
|
@@ -152,14 +154,23 @@ export interface Handle<Target extends AnyRoute, Selected extends Record<string,
|
|
|
152
154
|
*/
|
|
153
155
|
link<Keys extends keyof SearchOf<Target> = never>(selector: ".", values: UrlValues<Target, Keys>): UrlTree;
|
|
154
156
|
/**
|
|
155
|
-
* Creates a UrlTree for a statically admitted absolute
|
|
157
|
+
* Creates a UrlTree for a statically admitted absolute authored selector.
|
|
156
158
|
*
|
|
157
159
|
* @param selector - A single known template literal, never a concrete URL.
|
|
158
160
|
* @param values - The selected target's complete explicit values.
|
|
159
161
|
* @returns Router.parseUrl's result without navigating.
|
|
160
162
|
* @throws Synchronously for unknown selectors or invalid URL values.
|
|
161
163
|
*/
|
|
162
|
-
link<const Selector extends keyof
|
|
164
|
+
link<const Selector extends keyof Absolute & string, Keys extends keyof SearchOf<NoInfer<Absolute[Selector]>> = never>(selector: Selector & (IsUnion<Selector> extends true ? never : unknown), values: UrlValues<NoInfer<Absolute[Selector]>, Keys>): UrlTree;
|
|
165
|
+
/**
|
|
166
|
+
* Creates a UrlTree for the parent route, when the bound declaration has one.
|
|
167
|
+
*
|
|
168
|
+
* @param selector - The literal `..`.
|
|
169
|
+
* @param values - The parent route's complete explicit values.
|
|
170
|
+
* @returns Router.parseUrl's result without navigating.
|
|
171
|
+
* @throws Synchronously for invalid URL values.
|
|
172
|
+
*/
|
|
173
|
+
link<Keys extends keyof SearchOf<Parent> = never>(selector: [Parent] extends [never] ? never : "..", values: UrlValues<Parent, Keys>): UrlTree;
|
|
163
174
|
/**
|
|
164
175
|
* Creates a UrlTree for a generated reference's own exact declaration.
|
|
165
176
|
*
|
|
@@ -187,14 +198,23 @@ export interface Handle<Target extends AnyRoute, Selected extends Record<string,
|
|
|
187
198
|
*/
|
|
188
199
|
navigate<Keys extends keyof SearchOf<Target> = never>(selector: ".", values: UrlValues<Target, Keys>): Promise<boolean>;
|
|
189
200
|
/**
|
|
190
|
-
* Navigates to a statically admitted absolute
|
|
201
|
+
* Navigates to a statically admitted absolute authored selector.
|
|
191
202
|
*
|
|
192
203
|
* @param selector - A single known template literal, never a concrete URL.
|
|
193
204
|
* @param values - The selected target's complete explicit values.
|
|
194
205
|
* @returns Angular's identical Router.navigateByUrl Promise.
|
|
195
206
|
* @throws Synchronously for unknown selectors or invalid URL values.
|
|
196
207
|
*/
|
|
197
|
-
navigate<const Selector extends keyof
|
|
208
|
+
navigate<const Selector extends keyof Absolute & string, Keys extends keyof SearchOf<NoInfer<Absolute[Selector]>> = never>(selector: Selector & (IsUnion<Selector> extends true ? never : unknown), values: UrlValues<NoInfer<Absolute[Selector]>, Keys>): Promise<boolean>;
|
|
209
|
+
/**
|
|
210
|
+
* Navigates to the parent route, when the bound declaration has one.
|
|
211
|
+
*
|
|
212
|
+
* @param selector - The literal `..`.
|
|
213
|
+
* @param values - The parent route's complete explicit values.
|
|
214
|
+
* @returns Angular's identical Router.navigateByUrl Promise.
|
|
215
|
+
* @throws Synchronously for invalid URL values.
|
|
216
|
+
*/
|
|
217
|
+
navigate<Keys extends keyof SearchOf<Parent> = never>(selector: [Parent] extends [never] ? never : "..", values: UrlValues<Parent, Keys>): Promise<boolean>;
|
|
198
218
|
/**
|
|
199
219
|
* Navigates to a generated reference's own exact declaration.
|
|
200
220
|
*
|
|
@@ -206,5 +226,5 @@ export interface Handle<Target extends AnyRoute, Selected extends Record<string,
|
|
|
206
226
|
navigate<const Id extends keyof References & string, Keys extends keyof SearchOf<NoInfer<References[Id]>> = never>(selector: Destination<NoInfer<References[Id]>, Set, Id> & (IsUnion<Id> extends true ? never : unknown), values: UrlValues<NoInfer<References[Id]>, Keys>): Promise<boolean>;
|
|
207
227
|
}
|
|
208
228
|
export declare function nativeOptions(definition: AnyRoute): Record<string, unknown>;
|
|
209
|
-
export declare function injectGeneratedRoute<Target extends AnyRoute,
|
|
229
|
+
export declare function injectGeneratedRoute<Target extends AnyRoute, Absolute extends Record<string, AnyRoute>, Parent extends AnyRoute, Set, References extends Record<string, AnyRoute>>(set: RouteSet, id: string): Handle<Target, Absolute, Parent, Set, References>;
|
|
210
230
|
export type { RecordBinding, RouteSet };
|