nuxt-typed-router 2.3.1 → 2.3.2

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": "2.3.1"
8
+ "version": "2.3.2"
9
9
  }
package/dist/module.mjs CHANGED
@@ -238,7 +238,8 @@ function createTypedRouterFile() {
238
238
  strictOptions.router.strictRouteLocation,
239
239
  `| Omit<RouteLocationPathRaw, 'path'>`,
240
240
  "| RouteLocationPathRaw"
241
- )};
241
+ )}
242
+ ;
242
243
 
243
244
 
244
245
  /**
@@ -362,7 +363,7 @@ function createTypedRouterDefinitionFile() {
362
363
  import type { NuxtLinkProps } from '#app';
363
364
  import type { DefineComponent } from 'vue';
364
365
  import type { RouteLocationRaw, RouteLocationPathRaw } from 'vue-router';
365
- import type { RoutesNamedLocations, RoutesNamesListRecord } from './__routes';
366
+ import type { RoutesNamesList, RoutesNamedLocations, RoutesNamesListRecord } from './__routes';
366
367
  import type {TypedRouter, TypedRoute} from './__router';
367
368
  import { useRoute as _useRoute } from './__useTypedRoute';
368
369
  import { useRouter as _useRouter } from './__useTypedRouter';
@@ -627,12 +628,15 @@ function createi18nRouterFile() {
627
628
  `
628
629
 
629
630
  import { useLocalePath as _useLocalePath, useLocaleRoute as _useLocaleRoute} from 'vue-i18n-routing';
630
- import type {TypedRouteLocationRawFromName, TypedRouteFromName} from './__router';
631
+ import type {TypedRouteLocationRawFromName, TypedRouteFromName, TypedLocationAsRelativeRaw} from './__router';
631
632
  import type {RoutesNamesList} from './__routes';
632
633
 
633
634
  export type I18nLocales = ${i18nLocales.length ? i18nLocales.map((loc) => `"${loc}"`).join("|") : "string"};
634
635
 
635
- export type TypedToLocalePath = <T extends RoutesNamesList>(to: TypedRouteLocationRawFromName<T>, locale?: I18nLocales | undefined) => TypedRouteLocationRawFromName<T>;
636
+ export type TypedToLocalePath = <T extends RoutesNamesList>(
637
+ to: TypedRouteLocationRawFromName<T>,
638
+ locale?: I18nLocales | undefined
639
+ ) => Required<TypedLocationAsRelativeRaw<T>>;
636
640
 
637
641
  export function useLocalePath(options?: Pick<NonNullable<Parameters<typeof _useLocalePath>[0]>, 'i18n'>): TypedToLocalePath {
638
642
  return _useLocalePath(options) as any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-typed-router",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Provide autocompletion for pages route names generated by Nuxt router",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -18,7 +18,6 @@
18
18
  "scripts": {
19
19
  "prepack": "nuxt-module-build",
20
20
  "dev": "nuxi dev playground",
21
- "prepare": "nuxi prepare playground",
22
21
  "dev:build": "nuxi build playground",
23
22
  "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground && pnpm run test:prepare-fixtures",
24
23
  "build:test": "cross-env NUXT_BUILD_TYPE=stub pnpm run prepack && pnpm run dev:build",