nuxt-typed-router 2.3.2 → 2.3.3

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.2"
8
+ "version": "2.3.3"
9
9
  }
package/dist/module.mjs CHANGED
@@ -633,10 +633,10 @@ function createi18nRouterFile() {
633
633
 
634
634
  export type I18nLocales = ${i18nLocales.length ? i18nLocales.map((loc) => `"${loc}"`).join("|") : "string"};
635
635
 
636
- export type TypedToLocalePath = <T extends RoutesNamesList>(
636
+ export type TypedToLocalePath = <T extends RoutesNamesList = never>(
637
637
  to: TypedRouteLocationRawFromName<T>,
638
638
  locale?: I18nLocales | undefined
639
- ) => Required<TypedLocationAsRelativeRaw<T>>;
639
+ ) => [T] extends [never] ? string : Required<TypedLocationAsRelativeRaw<T>>;
640
640
 
641
641
  export function useLocalePath(options?: Pick<NonNullable<Parameters<typeof _useLocalePath>[0]>, 'i18n'>): TypedToLocalePath {
642
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.2",
3
+ "version": "2.3.3",
4
4
  "description": "Provide autocompletion for pages route names generated by Nuxt router",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -25,7 +25,7 @@
25
25
  "test:fixtures": " vitest run --dir test",
26
26
  "test:types": "pnpm run typecheck && pnpm run test:vue && vitest typecheck --run --dir test",
27
27
  "test:vue": "vue-tsc -p test/fixtures/simple/tsconfig.json --noEmit && vue-tsc -p test/fixtures/complex/tsconfig.json --noEmit && vue-tsc -p test/fixtures/withOptions/tsconfig.json --noEmit",
28
- "test": "pnpm run dev:prepare && pnpm run test:fixtures && pnpm run test:types",
28
+ "test": "pnpm run dev:prepare && pnpm run test:types && pnpm run test:fixtures",
29
29
  "docs:dev": "cd docs && pnpm run dev",
30
30
  "docs:build": "npm run dev:prepare && cd docs && nuxi generate",
31
31
  "typecheck": "tsc --noEmit"