Skip to content

Commit 42c9849

Browse files
committed
chore: comments
1 parent a515a21 commit 42c9849

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

packages/router/src/experimental/router.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ export interface EXPERIMENTAL_RouterOptions_Base extends PathParserOptions {
126126
* }
127127
* ```
128128
*/
129-
130129
scrollBehavior?: RouterScrollBehavior
130+
131131
/**
132132
* Custom implementation to parse a query. See its counterpart,
133133
* {@link EXPERIMENTAL_RouterOptions_Base.stringifyQuery}.
@@ -145,26 +145,27 @@ export interface EXPERIMENTAL_RouterOptions_Base extends PathParserOptions {
145145
* })
146146
* ```
147147
*/
148-
149148
parseQuery?: typeof originalParseQuery
149+
150150
/**
151151
* Custom implementation to stringify a query object. Should not prepend a leading `?`.
152-
* {@link EXPERIMENTAL_RouterOptions_Base.parseQuery | parseQuery} counterpart to handle query parsing.
152+
* {@link parseQuery} counterpart to handle query parsing.
153153
*/
154154

155155
stringifyQuery?: typeof originalStringifyQuery
156+
156157
/**
157158
* Default class applied to active {@link RouterLink}. If none is provided,
158159
* `router-link-active` will be applied.
159160
*/
160-
161161
linkActiveClass?: string
162+
162163
/**
163164
* Default class applied to exact active {@link RouterLink}. If none is provided,
164165
* `router-link-exact-active` will be applied.
165166
*/
166-
167167
linkExactActiveClass?: string
168+
168169
/**
169170
* Default class applied to non-active {@link RouterLink}. If none is provided,
170171
* `router-link-inactive` will be applied.
@@ -191,7 +192,7 @@ export interface EXPERIMENTAL_RouterOptions<TRouteRecordRaw, TRouteRecord>
191192
}
192193

193194
/**
194-
* Router instance.
195+
* Router base instance.
195196
* @experimental This version is not stable, it's meant to replace {@link Router} in the future.
196197
*/
197198
export interface EXPERIMENTAL_Router_Base<TRouteRecordRaw, TRouteRecord> {
@@ -1161,7 +1162,6 @@ export function experimental_createRouter(
11611162
}
11621163

11631164
// Initialization and Errors
1164-
11651165
let readyHandlers = useCallbacks<_OnReadyCallback>()
11661166
let errorListeners = useCallbacks<_ErrorListener>()
11671167
let ready: boolean
@@ -1206,9 +1206,9 @@ export function experimental_createRouter(
12061206
* only be called once, otherwise does nothing.
12071207
* @param err - optional error
12081208
*/
1209-
function markAsReady<E = any>(err: E): E
1210-
function markAsReady<E = any>(): void
1211-
function markAsReady<E = any>(err?: E): E | void {
1209+
function markAsReady<E = unknown>(err: E): E
1210+
function markAsReady(): void
1211+
function markAsReady<E = unknown>(err?: E): E | void {
12121212
if (!ready) {
12131213
// still not ready if an error happened
12141214
ready = !err

packages/router/src/new-route-resolver/matcher.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,6 @@ export function createCompiledMatcher(
325325
// }
326326

327327
parsedParams = { ...pathParams, ...queryParams, ...hashParams }
328-
329-
if (parsedParams) break
330328
} catch (e) {
331329
// for debugging tests
332330
// console.log('❌ ERROR matching', e)

packages/router/src/types/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export type RouteComponent = Component | DefineComponent
185185
*/
186186
export type RawRouteComponent = RouteComponent | Lazy<RouteComponent>
187187

188-
// TODO: could this be moved to matcher?
188+
// TODO: could this be moved to matcher? YES, it's on the way
189189
/**
190190
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
191191
*/
@@ -278,7 +278,9 @@ export interface RouteRecordSingleView extends _RouteRecordBase {
278278
}
279279

280280
/**
281-
* Route Record defining one single component with a nested view.
281+
* Route Record defining one single component with a nested view. Differently
282+
* from {@link RouteRecordSingleView}, this record has children and allows a
283+
* `redirect` option.
282284
*/
283285
export interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
284286
/**

0 commit comments

Comments
 (0)