typescript version and import type

This commit is contained in:
Michael Dausmann
2024-02-17 14:34:54 +11:00
parent 5d80955870
commit 0b7635ca1a
6 changed files with 10 additions and 9 deletions

View File

@@ -2,5 +2,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"typescript.tsdk": "node_modules/typescript/lib"
}

View File

@@ -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';

View File

@@ -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';

View File

@@ -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' {

View File

@@ -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' });

View File

@@ -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