break
case TokenizerState.ParamRegExp:
+ // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)
+ // it already works by escaping the closing )
+ // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#
+ // is this really something people need since you can also write
+ // /prefix_:p()_suffix
if (char === ')') {
// handle the escaped )
if (customRe[customRe.length - 1] == '\\')
path: string
}
-export interface LocationAsNameRaw {
- name: RouteRecordName
- params?: RouteParamsRaw
-}
-
export interface LocationAsName {
name: RouteRecordName
params?: RouteParams
}
export interface LocationAsRelativeRaw {
+ name?: RouteRecordName
params?: RouteParamsRaw
}
export type RouteLocationRaw =
| string
| (RouteQueryAndHash & LocationAsPath & RouteLocationOptions)
- | (RouteQueryAndHash & LocationAsNameRaw & RouteLocationOptions)
| (RouteQueryAndHash & LocationAsRelativeRaw & RouteLocationOptions)
export interface RouteLocationMatched extends RouteRecordNormalized {