Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 10, 2021
1 parent 7b26035 commit 477d673
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
6 changes: 2 additions & 4 deletions __tests__/guards/beforeRouteEnter.spec.ts
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion src/RouterLink.ts
Expand Up @@ -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 &
Expand Down
2 changes: 1 addition & 1 deletion src/RouterView.ts
Expand Up @@ -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 &
Expand Down
7 changes: 2 additions & 5 deletions src/router.ts
Expand Up @@ -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(
Expand Down

0 comments on commit 477d673

Please sign in to comment.