Skip to content

Commit 6198488

Browse files
committed
refactor: rename router sequences
1 parent 7febcb5 commit 6198488

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/router-component-store/src/lib/router-history-store/router-history.store.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ interface RouterHistoryState {
1313
/**
1414
* The history of all navigations.
1515
*/
16-
readonly history: NavigationHistory;
16+
readonly history: RouterNavigationHistory;
1717
}
1818

19-
type CompleteNavigation = readonly [NavigationStart, NavigationEnd];
20-
type NavigationHistory = Record<number, NavigationSequence>;
21-
type NavigationSequence = PendingNavigation | CompleteNavigation;
22-
type PendingNavigation = readonly [NavigationStart];
19+
type RouterNavigatedSequence = readonly [NavigationStart, NavigationEnd];
20+
type RouterNavigationHistory = Record<number, RouterNavigationSequence>;
21+
type RouterNavigationSequence = RouterRequestSequence | RouterNavigatedSequence;
22+
type RouterRequestSequence = readonly [NavigationStart];
2323

2424
/**
2525
* Provide and initialize the `RouterHistoryStore`.
@@ -81,7 +81,7 @@ export class RouterHistoryStore extends ComponentStore<RouterHistoryState> {
8181
this.#maxCompletedNavigationId$,
8282
this.#history$,
8383
(maxCompletedNavigationId, history) =>
84-
history[maxCompletedNavigationId] as CompleteNavigation,
84+
history[maxCompletedNavigationId] as RouterNavigatedSequence,
8585
{
8686
debounce: true,
8787
}
@@ -175,8 +175,8 @@ export class RouterHistoryStore extends ComponentStore<RouterHistoryState> {
175175
*/
176176
#getNavigationSource(
177177
navigationId: number,
178-
history: NavigationHistory
179-
): CompleteNavigation {
178+
history: RouterNavigationHistory
179+
): RouterNavigatedSequence {
180180
let navigation = history[navigationId];
181181

182182
while (navigation[0].navigationTrigger === 'popstate') {
@@ -189,7 +189,7 @@ export class RouterHistoryStore extends ComponentStore<RouterHistoryState> {
189189
];
190190
}
191191

192-
return navigation as CompleteNavigation;
192+
return navigation as RouterNavigatedSequence;
193193
}
194194
}
195195

0 commit comments

Comments
 (0)