-import { createRouter, createWebHistory, ScrollBehavior } from '../../src'
+import { createRouter, createWebHistory, RouterScrollBehavior } from '../../src'
import { RouteComponent } from '../../src/types'
import { createApp, ref } from 'vue'
import { scrollWaiter } from './scrollWaiter'
// - only available in html5 history mode
// - defaults to no scroll behavior
// - return false to prevent scroll
-const scrollBehavior: ScrollBehavior = async function (
+const scrollBehavior: RouterScrollBehavior = async function (
to,
from,
savedPosition
// savedPosition is only available for popstate navigations.
return { ...savedPosition, behavior }
} else {
- let position: ReturnType<ScrollBehavior>
+ let position: ReturnType<RouterScrollBehavior>
// scroll to anchor by returning the selector
if (to.hash) {