/**
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
*/
-export interface _RouteRecordBase
- extends PathParserOptions,
- _RouteRecordBaseMeta {
+export interface _RouteRecordBase extends PathParserOptions {
/**
* Path of the record. Should start with `/` unless the record is the child of
* another record.
/**
* Arbitrary data attached to the record.
*/
- // meta?: RouteMeta
+ meta?: RouteMeta
/**
* Array of nested routes.
props?: _RouteRecordProps | Record<string, _RouteRecordProps>
}
-/**
- * Default type for RouteMeta when not augmented.
- * @internal
- */
-export type _RouteMetaBase = Record<string | number | symbol, unknown>
-
/**
* Interface to type `meta` fields in route records.
*
* }
* ```
*/
-export interface RouteMeta extends _RouteMetaBase {}
-
-/**
- * Returns `true` if the passed `RouteMeta` type hasn't been augmented. Return `false` otherwise.
- * @internal
- */
-export type IsRouteMetaBase<RM> = _RouteMetaBase extends RM ? true : false
-/**
- * Returns `true` if the passed `RouteMeta` type has been augmented with required fields. Return `false` otherwise.
- * @internal
- */
-export type IsRouteMetaRequired<RM> = Partial<RM> extends RM ? false : true
-
-export type _RouteRecordBaseMeta = IsRouteMetaRequired<RouteMeta> extends true
- ? {
- /**
- * Arbitrary data attached to the record. Required because the `RouteMeta` type has been augmented with required
- * fields.
- */
- meta: RouteMeta
- }
- : {
- /**
- * Arbitrary data attached to the record.
- */
- meta?: RouteMeta
- }
+export interface RouteMeta extends Record<string | number | symbol, unknown> {}
/**
* Route Record defining one single component with the `component` option.