use typed imports

This commit is contained in:
Hayden 2024-03-01 11:21:45 -06:00
parent 5440fc60e1
commit 26b17e5cf8
No known key found for this signature in database
GPG key ID: 17CF79474E257545
54 changed files with 80 additions and 77 deletions

View file

@ -1,7 +1,7 @@
import { CookieRef } from "nuxt/app";
import { PublicApi } from "~~/lib/api/public";
import { UserOut } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user";
import type { CookieRef } from "nuxt/app";
import type { PublicApi } from "~~/lib/api/public";
import type { UserOut } from "~~/lib/api/types/data-contracts";
import type { UserClient } from "~~/lib/api/user";
export interface IAuthContext {
get token(): boolean | null;

View file

@ -1,5 +1,5 @@
import { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core";
import { Ref } from "vue";
import type { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core";
import type { Ref } from "vue";
type Store = UseConfirmDialogReturn<any, boolean, boolean> & {
text: Ref<string>;

View file

@ -1,5 +1,5 @@
import { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user";
import type { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts";
import type { UserClient } from "~~/lib/api/user";
type SearchOptions = {
immediate?: boolean;

View file

@ -1,5 +1,5 @@
import { Ref } from "vue";
import { TreeItem } from "~~/lib/api/types/data-contracts";
import type { Ref } from "vue";
import type { TreeItem } from "~~/lib/api/types/data-contracts";
export interface FlatTreeItem {
id: string;

View file

@ -1,4 +1,4 @@
import { WritableComputedRef } from "vue";
import type { WritableComputedRef } from "vue";
export function useMinLoader(ms = 500): WritableComputedRef<boolean> {
const loading = ref(false);

View file

@ -1,5 +1,5 @@
import { Ref } from "vue";
import { DaisyTheme } from "~~/lib/data/themes";
import type { Ref } from "vue";
import type { DaisyTheme } from "~~/lib/data/themes";
export type ViewType = "table" | "card" | "tree";

View file

@ -1,7 +1,7 @@
import { useRouteQuery as useRouteQueryBase } from "@vueuse/router";
/* eslint no-redeclare: 0 */
import { WritableComputedRef } from "vue";
import type { WritableComputedRef } from "vue";
export function useRouteQuery(q: string, def: string[]): WritableComputedRef<string[]>;
export function useRouteQuery(q: string, def: string): WritableComputedRef<string>;

View file

@ -1,5 +1,5 @@
import { ComputedRef } from "vue";
import { DaisyTheme } from "~~/lib/data/themes";
import type { ComputedRef } from "vue";
import type { DaisyTheme } from "~~/lib/data/themes";
export interface UseTheme {
theme: ComputedRef<DaisyTheme>;