Skip to content

Commit 477d673

Browse files
committed
chore: format
1 parent 7b26035 commit 477d673

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

__tests__/guards/beforeRouteEnter.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ import { RouteRecordRaw, NavigationGuard } from '../../src/types'
55
const Home = { template: `<div>Home</div>` }
66
const Foo = { template: `<div>Foo</div>` }
77

8-
const beforeRouteEnter = jest.fn<
9-
ReturnType<NavigationGuard>,
10-
Parameters<NavigationGuard>
11-
>()
8+
const beforeRouteEnter =
9+
jest.fn<ReturnType<NavigationGuard>, Parameters<NavigationGuard>>()
1210
const named = {
1311
default: jest.fn(),
1412
other: jest.fn(),

src/RouterLink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const RouterLinkImpl = /*#__PURE__*/ defineComponent({
212212
/**
213213
* Component to render a link that triggers a navigation on click.
214214
*/
215-
export const RouterLink = (RouterLinkImpl as any) as {
215+
export const RouterLink = RouterLinkImpl as {
216216
new (): {
217217
$props: AllowedComponentProps &
218218
ComponentCustomProps &

src/RouterView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function normalizeSlot(slot: Slot | undefined, data: any) {
162162
/**
163163
* Component to display the current route the user is at.
164164
*/
165-
export const RouterView = (RouterViewImpl as any) as {
165+
export const RouterView = RouterViewImpl as {
166166
new (): {
167167
$props: AllowedComponentProps &
168168
ComponentCustomProps &

src/router.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,8 @@ export function createRouter(options: RouterOptions): Router {
743743
): Promise<any> {
744744
let guards: Lazy<any>[]
745745

746-
const [
747-
leavingRecords,
748-
updatingRecords,
749-
enteringRecords,
750-
] = extractChangingRecords(to, from)
746+
const [leavingRecords, updatingRecords, enteringRecords] =
747+
extractChangingRecords(to, from)
751748

752749
// all components here have been resolved once because we are leaving
753750
guards = extractComponentsGuards(

0 commit comments

Comments
 (0)