nuxt-typed-router 2.3.2 → 2.3.4-beta.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 +1 -1
- package/dist/module.mjs +2 -2
- package/package.json +3 -3
- package/main.d.ts +0 -1
package/dist/module.json
CHANGED
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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-typed-router",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4-beta.0",
|
|
4
4
|
"description": "Provide autocompletion for pages route names generated by Nuxt router",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/module.cjs",
|
|
7
|
-
"types": "./
|
|
7
|
+
"types": "./dist/types.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"import": "./dist/module.mjs",
|
|
@@ -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:
|
|
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"
|
package/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './dist/module';
|