]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
refactor(experimental): parent property in records
authorEduardo San Martin Morote <posva13@gmail.com>
Sun, 19 Oct 2025 05:07:26 +0000 (07:07 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 19 Oct 2025 05:07:26 +0000 (07:07 +0200)
packages/router/src/experimental/router.ts

index 8db08ce633ac77e0a18d40657061cd78be068675..c2c249e24f87b7e1fee2dbb3c77a0d05d46eb60d 100644 (file)
@@ -222,7 +222,7 @@ export interface EXPERIMENTAL_RouteRecord_Base
   /**
    * Parent of this component if any
    */
-  parent?: EXPERIMENTAL_RouteRecordRaw
+  parent?: EXPERIMENTAL_RouteRecordNormalized | null
 
   // TODO:
   /**
@@ -233,36 +233,36 @@ export interface EXPERIMENTAL_RouteRecord_Base
 
 export interface EXPERIMENTAL_RouteRecord_Redirect
   // preserve the values from the type EXPERIMENTAL_ResolverRecord_Matchable
-  extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path' | 'parent'>,
+  extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path'>,
     EXPERIMENTAL_ResolverRecord_Matchable {
   components?: Record<string, RawRouteComponent>
 
   redirect: RouteRecordRedirectOption // must be defined
 
-  parent?: EXPERIMENTAL_RouteRecordNormalized | null
+  parent?: EXPERIMENTAL_RouteRecordNormalized | null // must be redifined because of ResolverRecord_Matchable
 }
 
 export interface EXPERIMENTAL_RouteRecord_Group
   extends Omit<
       EXPERIMENTAL_RouteRecord_Base,
       // preserve the values from the type EXPERIMENTAL_ResolverRecord_Group
-      'name' | 'path' | 'query' | 'hash' | 'parent'
+      'name' | 'path' | 'query' | 'hash'
     >,
     EXPERIMENTAL_ResolverRecord_Group {
   components?: Record<string, RawRouteComponent>
 
-  parent?: EXPERIMENTAL_RouteRecordNormalized | null
+  parent?: EXPERIMENTAL_RouteRecordNormalized | null // must be redifined because of ResolverRecord_Matchable
 }
 
 export interface EXPERIMENTAL_RouteRecord_Components
   // preserve the values from the type EXPERIMENTAL_ResolverRecord_Matchable
-  extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path' | 'parent'>,
+  extends Omit<EXPERIMENTAL_RouteRecord_Base, 'name' | 'path'>,
     EXPERIMENTAL_ResolverRecord_Matchable {
   components: Record<string, RawRouteComponent>
 
   redirect?: never
 
-  parent?: EXPERIMENTAL_RouteRecordNormalized | null
+  parent?: EXPERIMENTAL_RouteRecordNormalized | null // must be redifined because of ResolverRecord_Matchable
 }
 
 export type EXPERIMENTAL_RouteRecord_Matchable =