From b674651fbce5ff2c17a52eee7b27814aa5161c54 Mon Sep 17 00:00:00 2001 From: SebClem Date: Wed, 14 Aug 2024 12:02:12 +0200 Subject: [PATCH] Fix compilation error --- nextcloud_backup/frontend/components.d.ts | 2 +- .../frontend/src/components/AlertManager.vue | 2 +- nextcloud_backup/frontend/typed-router.d.ts | 140 ++---------------- 3 files changed, 13 insertions(+), 131 deletions(-) diff --git a/nextcloud_backup/frontend/components.d.ts b/nextcloud_backup/frontend/components.d.ts index a498262..38b4af7 100644 --- a/nextcloud_backup/frontend/components.d.ts +++ b/nextcloud_backup/frontend/components.d.ts @@ -1,10 +1,10 @@ /* eslint-disable */ -/* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} +/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { ActionComponent: typeof import('./src/components/statusBar/ActionComponent.vue')['default'] diff --git a/nextcloud_backup/frontend/src/components/AlertManager.vue b/nextcloud_backup/frontend/src/components/AlertManager.vue index 7942d04..205878f 100644 --- a/nextcloud_backup/frontend/src/components/AlertManager.vue +++ b/nextcloud_backup/frontend/src/components/AlertManager.vue @@ -25,6 +25,7 @@ + alertList.value.length > 0); } } -@/store/alert diff --git a/nextcloud_backup/frontend/typed-router.d.ts b/nextcloud_backup/frontend/typed-router.d.ts index c2070dc..507aa91 100644 --- a/nextcloud_backup/frontend/typed-router.d.ts +++ b/nextcloud_backup/frontend/typed-router.d.ts @@ -5,136 +5,18 @@ // It's recommended to commit this file. // Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry. -/// +declare module 'vue-router/auto-routes' { + import type { + RouteRecordInfo, + ParamValue, + ParamValueOneOrMore, + ParamValueZeroOrMore, + ParamValueZeroOrOne, + } from 'vue-router' -import type { - // type safe route locations - RouteLocationTypedList, - RouteLocationResolvedTypedList, - RouteLocationNormalizedTypedList, - RouteLocationNormalizedLoadedTypedList, - RouteLocationAsString, - RouteLocationAsRelativeTypedList, - RouteLocationAsPathTypedList, - - // helper types - // route definitions - RouteRecordInfo, - ParamValue, - ParamValueOneOrMore, - ParamValueZeroOrMore, - ParamValueZeroOrOne, - - // vue-router extensions - _RouterTyped, - RouterLinkTyped, - RouterLinkPropsTyped, - NavigationGuard, - UseLinkFnTyped, - - // data fetching - _DataLoader, - _DefineLoaderOptions, -} from 'unplugin-vue-router/types' - -declare module 'vue-router/auto/routes' { + /** + * Route name map generated by unplugin-vue-router + */ export interface RouteNamedMap { } } - -declare module 'vue-router/auto' { - import type { RouteNamedMap } from 'vue-router/auto/routes' - - export type RouterTyped = _RouterTyped - - /** - * Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards). - * Allows passing the name of the route to be passed as a generic. - */ - export type RouteLocationNormalized = RouteLocationNormalizedTypedList[Name] - - /** - * Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`). - * Allows passing the name of the route to be passed as a generic. - */ - export type RouteLocationNormalizedLoaded = RouteLocationNormalizedLoadedTypedList[Name] - - /** - * Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`). - * Allows passing the name of the route to be passed as a generic. - */ - export type RouteLocationResolved = RouteLocationResolvedTypedList[Name] - - /** - * Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic. - */ - export type RouteLocation = RouteLocationTypedList[Name] - - /** - * Type safe version of `RouteLocationRaw` . Allows passing the name of the route to be passed as a generic. - */ - export type RouteLocationRaw = - | RouteLocationAsString - | RouteLocationAsRelativeTypedList[Name] - | RouteLocationAsPathTypedList[Name] - - /** - * Generate a type safe params for a route location. Requires the name of the route to be passed as a generic. - */ - export type RouteParams = RouteNamedMap[Name]['params'] - /** - * Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic. - */ - export type RouteParamsRaw = RouteNamedMap[Name]['paramsRaw'] - - export function useRouter(): RouterTyped - export function useRoute(name?: Name): RouteLocationNormalizedLoadedTypedList[Name] - - export const useLink: UseLinkFnTyped - - export function onBeforeRouteLeave(guard: NavigationGuard): void - export function onBeforeRouteUpdate(guard: NavigationGuard): void - - export const RouterLink: RouterLinkTyped - export const RouterLinkProps: RouterLinkPropsTyped - - // Experimental Data Fetching - - export function defineLoader< - P extends Promise, - Name extends keyof RouteNamedMap = keyof RouteNamedMap, - isLazy extends boolean = false, - >( - name: Name, - loader: (route: RouteLocationNormalizedLoaded) => P, - options?: _DefineLoaderOptions, - ): _DataLoader, isLazy> - export function defineLoader< - P extends Promise, - isLazy extends boolean = false, - >( - loader: (route: RouteLocationNormalizedLoaded) => P, - options?: _DefineLoaderOptions, - ): _DataLoader, isLazy> - - export { - _definePage as definePage, - _HasDataLoaderMeta as HasDataLoaderMeta, - _setupDataFetchingGuard as setupDataFetchingGuard, - _stopDataFetchingScope as stopDataFetchingScope, - } from 'unplugin-vue-router/runtime' -} - -declare module 'vue-router' { - import type { RouteNamedMap } from 'vue-router/auto/routes' - - export interface TypesConfig { - beforeRouteUpdate: NavigationGuard - beforeRouteLeave: NavigationGuard - - $route: RouteLocationNormalizedLoadedTypedList[keyof RouteNamedMap] - $router: _RouterTyped - - RouterLink: RouterLinkTyped - } -}