11import { describe , expect , it } from 'vitest'
22import { defineComponent } from 'vue'
3- import { RouteComponent , RouteMeta , RouteRecordRaw } from '../types'
4- import { NEW_stringifyURL } from '../location'
5- import { mockWarn } from '../../__tests__/vitest-mock-warn'
3+ import { RouteComponent , RouteMeta , RouteRecordRaw } from '../../ types'
4+ import { NEW_stringifyURL } from '../../ location'
5+ import { mockWarn } from '../../../ __tests__/vitest-mock-warn'
66import {
7- createCompiledMatcher ,
87 type MatcherLocationRaw ,
9- type NEW_MatcherRecordRaw ,
10- type NEW_LocationResolved ,
8+ type ResolverLocationResolved ,
119 type NEW_MatcherRecord ,
1210 NO_MATCH_LOCATION ,
13- } from './resolver'
11+ } from './resolver-abstract'
12+ import { type NEW_MatcherRecordRaw } from './resolver-dynamic'
13+ import { createCompiledMatcher } from './resolver-dynamic'
1414import { miss } from './matchers/errors'
15- import { MatcherPatternPath , MatcherPatternPathStatic } from './matcher-pattern'
16- import { EXPERIMENTAL_RouterOptions } from '../experimental/router'
17- import { stringifyQuery } from '../query'
18- import type {
19- MatcherLocationAsNamed ,
20- MatcherLocationAsPathAbsolute ,
21- } from './matcher-location'
15+ import {
16+ MatcherPatternPath ,
17+ MatcherPatternPathStatic ,
18+ } from './matchers/matcher-pattern'
19+ import { EXPERIMENTAL_RouterOptions } from '../router'
20+ import { stringifyQuery } from '../../query'
21+ import type { ResolverLocationAsPathAbsolute } from './resolver-abstract'
22+ import type { ResolverLocationAsNamed } from './resolver-abstract'
2223// TODO: should be moved to a different test file
2324// used to check backward compatible paths
2425import {
2526 PATH_PARSER_OPTIONS_DEFAULTS ,
2627 PathParams ,
2728 tokensToParser ,
28- } from '../matcher/pathParserRanker'
29- import { tokenizePath } from '../matcher/pathTokenizer'
30- import { mergeOptions } from '../utils'
29+ } from '../../ matcher/pathParserRanker'
30+ import { tokenizePath } from '../../ matcher/pathTokenizer'
31+ import { mergeOptions } from '../../ utils'
3132
3233// FIXME: this type was removed, it will be a new one once a dynamic resolver is implemented
3334export interface EXPERIMENTAL_RouteRecordRaw extends NEW_MatcherRecordRaw {
@@ -128,7 +129,7 @@ describe('RouterMatcher.resolve', () => {
128129
129130 function isMatcherLocationResolved (
130131 location : unknown
131- ) : location is NEW_LocationResolved < NEW_MatcherRecord > {
132+ ) : location is ResolverLocationResolved < NEW_MatcherRecord > {
132133 return ! ! (
133134 location &&
134135 typeof location === 'object' &&
@@ -155,11 +156,11 @@ describe('RouterMatcher.resolve', () => {
155156 toLocation : Exclude < MatcherLocationRaw , string > | `/${string } `,
156157 expectedLocation : Partial < MatcherResolvedLocation > ,
157158 fromLocation :
158- | NEW_LocationResolved < NEW_MatcherRecord >
159+ | ResolverLocationResolved < NEW_MatcherRecord >
159160 // absolute locations only that can be resolved for convenience
160161 | `/${string } `
161- | MatcherLocationAsNamed
162- | MatcherLocationAsPathAbsolute = START_LOCATION
162+ | ResolverLocationAsNamed
163+ | ResolverLocationAsPathAbsolute = START_LOCATION
163164 ) {
164165 const records = ( Array . isArray ( record ) ? record : [ record ] ) . map (
165166 ( record ) : NEW_MatcherRecordRaw =>
0 commit comments