]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: format
authorEduardo San Martin Morote <posva13@gmail.com>
Mon, 10 May 2021 08:33:22 +0000 (10:33 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 10 May 2021 08:33:22 +0000 (10:33 +0200)
__tests__/guards/beforeRouteEnter.spec.ts
src/RouterLink.ts
src/RouterView.ts
src/router.ts

index 82e05418c05dc83bc0e1bcca0fe5fd478b721fa4..7a5397da7702a5a52ba41f933316a1bae595e865 100644 (file)
@@ -5,10 +5,8 @@ import { RouteRecordRaw, NavigationGuard } from '../../src/types'
 const Home = { template: `<div>Home</div>` }
 const Foo = { template: `<div>Foo</div>` }
 
-const beforeRouteEnter = jest.fn<
-  ReturnType<NavigationGuard>,
-  Parameters<NavigationGuard>
->()
+const beforeRouteEnter =
+  jest.fn<ReturnType<NavigationGuard>, Parameters<NavigationGuard>>()
 const named = {
   default: jest.fn(),
   other: jest.fn(),
index efe99b6eea90c132351ca857b0d5edd266c2a78a..59b260f1435a08a45b474c1c5da967c37f95a0bf 100644 (file)
@@ -212,7 +212,7 @@ export const RouterLinkImpl = /*#__PURE__*/ defineComponent({
 /**
  * Component to render a link that triggers a navigation on click.
  */
-export const RouterLink = (RouterLinkImpl as any) as {
+export const RouterLink = RouterLinkImpl as {
   new (): {
     $props: AllowedComponentProps &
       ComponentCustomProps &
index 8d4ca3f30d29ea1c7f26b88b8c13d8662e7ee270..4220d2e8cb7cad8d08c700452220e7a41261df45 100644 (file)
@@ -162,7 +162,7 @@ function normalizeSlot(slot: Slot | undefined, data: any) {
 /**
  * Component to display the current route the user is at.
  */
-export const RouterView = (RouterViewImpl as any) as {
+export const RouterView = RouterViewImpl as {
   new (): {
     $props: AllowedComponentProps &
       ComponentCustomProps &
index 6395c5eff23a2cecb231c55d20900184541f88a2..eb3d99138b8e9a36e812785702094e102f243c68 100644 (file)
@@ -743,11 +743,8 @@ export function createRouter(options: RouterOptions): Router {
   ): Promise<any> {
     let guards: Lazy<any>[]
 
-    const [
-      leavingRecords,
-      updatingRecords,
-      enteringRecords,
-    ] = extractChangingRecords(to, from)
+    const [leavingRecords, updatingRecords, enteringRecords] =
+      extractChangingRecords(to, from)
 
     // all components here have been resolved once because we are leaving
     guards = extractComponentsGuards(