MatcherLocationRaw,
MatcherLocation,
} from '../../src/types'
-import { MatcherLocationNormalizedLoose, RouteRecordViewLoose } from '../utils'
+import { MatcherLocationNormalizedLoose } from '../utils'
import { mockWarn } from 'jest-mock-warn'
import { defineComponent } from '@vue/runtime-core'
const component: RouteComponent = defineComponent({})
-const baseRouteRecordNormalized: RouteRecordViewLoose = {
- instances: {},
- enterCallbacks: {},
- aliasOf: undefined,
- components: null,
- path: '',
- props: {},
-}
-
// for normalized records
const components = { default: component }
matched: [
{
path: '/p',
- // @ts-expect-error: doesn't matter
children,
components,
aliasOf: expect.objectContaining({ path: '/parent' }),
matched: [
{
path: '/parent',
- // @ts-expect-error
children,
components,
aliasOf: undefined,
name: 'child-b',
path: '/foo/b',
params: {},
- matched: [
- Foo as any,
- { ...ChildB, path: `${Foo.path}/${ChildB.path}` },
- ],
+ matched: [Foo, { ...ChildB, path: `${Foo.path}/${ChildB.path}` }],
}
)
})
enterCallbacks: Record<string, Function[]>
props: Record<string, _RouteRecordProps>
aliasOf: RouteRecordViewLoose | undefined
- children?: RouteRecordViewLoose[]
+ children?: RouteRecordRaw[]
components: Record<string, RouteComponent> | null | undefined
}
_RouteRecordBase,
_RouteRecordProps,
NavigationGuardNextCallback,
+ RouteRecordSingleViewWithChildren,
} from '../types'
import { ComponentPublicInstance } from 'vue'
*/
components: RouteRecordMultipleViews['components'] | null | undefined
/**
- * {@inheritDoc _RouteRecordBase.components}
+ * Nested route records.
*/
- children: Exclude<_RouteRecordBase['children'], void>
+ children: RouteRecordSingleViewWithChildren['children']
/**
* {@inheritDoc _RouteRecordBase.meta}
*/
reactive,
unref,
computed,
- ref,
} from 'vue'
import { RouteRecord, RouteRecordNormalized } from './matcher/types'
import {