diff --git a/.vscode/settings.json b/.vscode/settings.json index d4eeef7..83f714c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/lib/services/account.service.ts b/lib/services/account.service.ts index e934c8c..5e88ba3 100644 --- a/lib/services/account.service.ts +++ b/lib/services/account.service.ts @@ -2,11 +2,11 @@ import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum'; import prisma_client from '~~/prisma/prisma.client'; import { accountWithMembers, - AccountWithMembers, + type AccountWithMembers, membershipWithAccount, - MembershipWithAccount, + type MembershipWithAccount, membershipWithUser, - MembershipWithUser + type MembershipWithUser } from './service.types'; import generator from 'generate-password-ts'; import { UtilService } from './util.service'; diff --git a/lib/services/auth.service.ts b/lib/services/auth.service.ts index da275ef..90a40d1 100644 --- a/lib/services/auth.service.ts +++ b/lib/services/auth.service.ts @@ -1,6 +1,6 @@ import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum'; import prisma_client from '~~/prisma/prisma.client'; -import { fullDBUser, FullDBUser } from './service.types'; +import { fullDBUser, type FullDBUser } from './service.types'; import { UtilService } from './util.service'; import generator from 'generate-password-ts'; diff --git a/server/middleware/authContext.ts b/server/middleware/authContext.ts index a583c3e..ec25cf6 100644 --- a/server/middleware/authContext.ts +++ b/server/middleware/authContext.ts @@ -2,8 +2,8 @@ import { defineEventHandler, parseCookies, setCookie, getCookie } from 'h3'; import { serverSupabaseUser } from '#supabase/server'; import { AuthService } from '~/lib/services/auth.service'; -import { User } from '@supabase/supabase-js'; -import { FullDBUser } from '~~/lib/services/service.types'; +import type { User } from '@supabase/supabase-js'; +import type { FullDBUser } from '~~/lib/services/service.types'; // Explicitly type our context by 'Merging' our custom types with the H3EventContext (https://stackoverflow.com/a/76349232/95242) declare module 'h3' { diff --git a/server/routes/create-checkout-session.post.ts b/server/routes/create-checkout-session.post.ts index 63de03a..2b08f68 100644 --- a/server/routes/create-checkout-session.post.ts +++ b/server/routes/create-checkout-session.post.ts @@ -1,7 +1,7 @@ import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum'; import Stripe from 'stripe'; import { AccountService } from '~~/lib/services/account.service'; -import { AccountWithMembers } from '~~/lib/services/service.types'; +import type { AccountWithMembers } from '~~/lib/services/service.types'; const config = useRuntimeConfig(); const stripe = new Stripe(config.stripeSecretKey, { apiVersion: '2022-11-15' }); diff --git a/server/trpc/routers/account.router.ts b/server/trpc/routers/account.router.ts index e8c52db..8dd9db2 100644 --- a/server/trpc/routers/account.router.ts +++ b/server/trpc/routers/account.router.ts @@ -9,7 +9,7 @@ import { import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum'; import { z } from 'zod'; import { AccountService } from '~~/lib/services/account.service'; -import { MembershipWithAccount } from '~~/lib/services/service.types'; +import type { MembershipWithAccount } from '~~/lib/services/service.types'; /* Note on proliferation of Bang syntax... adminProcedure throws if either the ctx.dbUser or the ctx.activeAccountId is not available but the compiler can't figure that out so bang quiesces the null warning