nuxt-typed-router 3.5.0-beta.2 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "3.5.0-beta.2"
8
+ "version": "3.5.0"
9
9
  }
package/dist/module.mjs CHANGED
@@ -784,7 +784,7 @@ function createUseTypedLinkFile() {
784
784
  `
785
785
 
786
786
  import { useLink as defaultLink } from '#imports';
787
- import type {MaybeRef} from 'vue';
787
+ import type {MaybeRef, Ref} from 'vue';
788
788
  import type { NavigateToOptions } from 'nuxt/dist/app/composables/router';
789
789
  import type { NavigationFailure } from 'vue-router';
790
790
  import type { TypedRouteLocationRawFromName, TypedRouteFromName, TypedRoute } from './__router';
@@ -807,20 +807,29 @@ function createUseTypedLinkFile() {
807
807
 
808
808
 
809
809
  interface UseLinkFunction {
810
- <T extends RoutesNamesList, P extends string>(
811
- props: {
812
- to: MaybeRef<TypedRouteLocationRawFromName<T, P>>,
813
- replace?: MaybeRef<boolean>
814
- }
815
- ) : LinkedRoute<T>
810
+ <T extends RoutesNamesList, P extends string>(props: {
811
+ to: TypedRouteLocationRawFromName<T, P>;
812
+ replace?: MaybeRef<boolean>;
813
+ }): LinkedRoute<T>;
814
+ <T extends RoutesNamesList, P extends string>(props: {
815
+ to: Ref<TypedRouteLocationRawFromName<T, P>>;
816
+ replace?: MaybeRef<boolean>;
817
+ }): LinkedRoute<T>;
818
+
816
819
  ${returnIfTrue(
817
820
  pathCheck && !strictOptions.router.strictToArgument,
818
- `<T extends string>(
821
+ `<P extends string>(
819
822
  props: {
820
- to: MaybeRef<TypedPathParameter<T>>,
823
+ to: TypedPathParameter<P>,
821
824
  replace?: MaybeRef<boolean>
822
825
  }
823
- ) : LinkedRoute<RouteNameFromPath<T>>`
826
+ ) : LinkedRoute<RouteNameFromPath<P>>
827
+ <P extends string>(props: {
828
+ to: Ref<TypedPathParameter<P>>;
829
+ replace?: MaybeRef<boolean>;
830
+ }): LinkedRoute<RouteNameFromPath<P>>;
831
+
832
+ `
824
833
  )}
825
834
  }
826
835
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-typed-router",
3
- "version": "3.5.0-beta.2",
3
+ "version": "3.5.0",
4
4
  "description": "Provide autocompletion for routes paths, names and params in Nuxt apps",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -96,10 +96,12 @@
96
96
  "nuxt": "3.8.2",
97
97
  "nuxt-seo-kit": "1.3.13",
98
98
  "playwright": "1.40.1",
99
+ "@playwright/test": "1.40.1",
99
100
  "prettier": "3.1.0",
100
101
  "tsd": "0.29.0",
101
102
  "typescript": "5.3.2",
102
103
  "vitest": "0.34.6",
104
+ "vue": "3.3.10",
103
105
  "vue-eslint-parser": "9.3.2",
104
106
  "vue-router": "4.2.5",
105
107
  "vue-tsc": "1.8.22",