isRouteName,
RouteRecordName,
_RouteRecordProps,
- RouteRecordRedirect,
} from '../types'
import { createRouterError, ErrorTypes, MatcherError } from '../errors'
import { createRouteRecordMatcher, RouteRecordMatcher } from './pathMatcher'
): Record<string, _RouteRecordProps> {
const propsObject = {} as Record<string, _RouteRecordProps>
// props does not exist on redirect records but we can set false directly
- const props =
- (record as Exclude<RouteRecordRaw, RouteRecordRedirect>).props || false
+ const props = record.props || false
if ('component' in record) {
propsObject.default = props
} else {
* Array of nested routes.
*/
children?: RouteRecordRaw[]
+
+ /**
+ * Allow passing down params as props to the component rendered by `router-view`.
+ */
+ props?: _RouteRecordProps | Record<string, _RouteRecordProps>
}
/**
redirect: RouteRecordRedirectOption
component?: never
components?: never
+ props?: never
}
export type RouteRecordRaw =