@@ -39,35 +39,53 @@ import {
39
39
*/
40
40
export interface Router {
41
41
/**
42
+ * @internal
43
+ * PRIVATE - DO NOT USE
44
+ *
42
45
* Return the basename for the router
43
46
*/
44
47
get basename ( ) : RouterInit [ "basename" ] ;
45
48
46
49
/**
50
+ * @internal
51
+ * PRIVATE - DO NOT USE
52
+ *
47
53
* Return the current state of the router
48
54
*/
49
55
get state ( ) : RouterState ;
50
56
51
57
/**
58
+ * @internal
59
+ * PRIVATE - DO NOT USE
60
+ *
52
61
* Return the routes for this router instance
53
62
*/
54
63
get routes ( ) : AgnosticDataRouteObject [ ] ;
55
64
56
65
/**
66
+ * @internal
67
+ * PRIVATE - DO NOT USE
68
+ *
57
69
* Initialize the router, including adding history listeners and kicking off
58
70
* initial data fetches. Returns a function to cleanup listeners and abort
59
71
* any in-progress loads
60
72
*/
61
73
initialize ( ) : Router ;
62
74
63
75
/**
76
+ * @internal
77
+ * PRIVATE - DO NOT USE
78
+ *
64
79
* Subscribe to router.state updates
65
80
*
66
81
* @param fn function to call with the new state
67
82
*/
68
83
subscribe ( fn : RouterSubscriber ) : ( ) => void ;
69
84
70
85
/**
86
+ * @internal
87
+ * PRIVATE - DO NOT USE
88
+ *
71
89
* Enable scroll restoration behavior in the router
72
90
*
73
91
* @param savedScrollPositions Object that will manage positions, in case
@@ -82,6 +100,9 @@ export interface Router {
82
100
) : ( ) => void ;
83
101
84
102
/**
103
+ * @internal
104
+ * PRIVATE - DO NOT USE
105
+ *
85
106
* Navigate forward/backward in the history stack
86
107
* @param to Delta to move in the history stack
87
108
*/
@@ -95,6 +116,9 @@ export interface Router {
95
116
navigate ( to : To , opts ?: RouterNavigateOptions ) : void ;
96
117
97
118
/**
119
+ * @internal
120
+ * PRIVATE - DO NOT USE
121
+ *
98
122
* Trigger a fetcher load/submission
99
123
*
100
124
* @param key Fetcher key
@@ -110,42 +134,61 @@ export interface Router {
110
134
) : void ;
111
135
112
136
/**
137
+ * @internal
138
+ * PRIVATE - DO NOT USE
139
+ *
113
140
* Trigger a revalidation of all current route loaders and fetcher loads
114
141
*/
115
142
revalidate ( ) : void ;
116
143
117
144
/**
145
+ * @internal
146
+ * PRIVATE - DO NOT USE
147
+ *
118
148
* Utility function to create an href for the given location
119
149
* @param location
120
150
*/
121
151
createHref ( location : Location | URL ) : string ;
122
152
123
153
/**
154
+ * @internal
155
+ * PRIVATE - DO NOT USE
156
+ *
124
157
* Get/create a fetcher for the given key
125
158
* @param key
126
159
*/
127
160
getFetcher < TData = any > ( key ?: string ) : Fetcher < TData > ;
128
161
129
162
/**
163
+ * @internal
164
+ * PRIVATE - DO NOT USE
165
+ *
130
166
* Delete the fetcher for a given key
131
167
* @param key
132
168
*/
133
169
deleteFetcher ( key ?: string ) : void ;
134
170
135
171
/**
172
+ * @internal
173
+ * PRIVATE - DO NOT USE
174
+ *
136
175
* Cleanup listeners and abort any in-progress loads
137
176
*/
138
177
dispose ( ) : void ;
139
178
140
179
/**
180
+ * @internal
181
+ * PRIVATE - DO NOT USE
182
+ *
141
183
* Internal fetch AbortControllers accessed by unit tests
142
- * @private
143
184
*/
144
185
_internalFetchControllers : Map < string , AbortController > ;
145
186
146
187
/**
188
+ * @internal
189
+ * PRIVATE - DO NOT USE
190
+ *
147
191
* Internal pending DeferredData instances accessed by unit tests
148
- * @private
149
192
*/
150
193
_internalActiveDeferreds : Map < string , DeferredData > ;
151
194
}
0 commit comments