]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
feat: make children optional in experimental
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 31 Jul 2025 16:03:39 +0000 (18:03 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 31 Jul 2025 16:03:39 +0000 (18:03 +0200)
packages/router/src/experimental/index.ts

index 83f7a8ff68f1d0396b0b6c25a781c0ae482f08b3..17b9db0ab9852a7fbefc1728e748d54095534b94 100644 (file)
@@ -31,3 +31,13 @@ export type {
   MatcherParamsFormatted,
   EmptyParams,
 } from './route-resolver/matchers/matcher-pattern'
+
+import type { RouteRecordNormalized } from '../matcher/types'
+
+// in the new experimental router, there are only parents
+// this should create type errors if someone is realying on children
+declare module 'vue-router' {
+  export interface RouteLocationMatched {
+    children?: RouteRecordNormalized['children']
+  }
+}