export { RouterHistory } from './history/common'
export { RouteRecord, RouteRecordNormalized } from './matcher/types'
+export {
+ PathParserOptions,
+ _PathParserOptions,
+} from './matcher/pathParserRanker'
export {
RouteLocationRaw,
PathParams,
comparePathParserScore,
PathParserOptions,
- PathParserOptionsPublic,
+ _PathParserOptions,
} from './pathParserRanker'
import { warn } from 'vue'
const matchers: RouteRecordMatcher[] = []
const matcherMap = new Map<RouteRecordName, RouteRecordMatcher>()
globalOptions = mergeOptions(
- { strict: false, end: true, sensitive: false } as PathParserOptionsPublic,
+ { strict: false, end: true, sensitive: false } as PathParserOptions,
globalOptions
)
return options
}
-export { PathParserOptionsPublic as PathParserOptions }
+export { PathParserOptions, _PathParserOptions }
stringify(params: PathParams): string
}
-export interface PathParserOptions {
+export interface _PathParserOptions {
/**
* Makes the RegExp case sensitive. Defaults to false
*/
end?: boolean
}
-export type PathParserOptionsPublic = Pick<
- PathParserOptions,
+export type PathParserOptions = Pick<
+ _PathParserOptions,
'end' | 'sensitive' | 'strict'
>
// default pattern for a param: non greedy everything but /
const BASE_PARAM_PATTERN = '[^/]+?'
-const BASE_PATH_PARSER_OPTIONS: Required<PathParserOptions> = {
+const BASE_PATH_PARSER_OPTIONS: Required<_PathParserOptions> = {
sensitive: false,
strict: false,
start: true,
*/
export function tokensToParser(
segments: Array<Token[]>,
- extraOptions?: PathParserOptions
+ extraOptions?: _PathParserOptions
): PathParser {
const options = {
...BASE_PATH_PARSER_OPTIONS,