diff --git a/server/api/auth/account.post.ts b/server/api/auth/account.post.ts index 1b2d033..e0b3be8 100644 --- a/server/api/auth/account.post.ts +++ b/server/api/auth/account.post.ts @@ -4,7 +4,7 @@ */ import { readUsers, writeUsers, nextUserId, type ServerUser, readAuthenticationMethods, nextAuthenticationMethodId, writeAuthenticationMethods } from "~/server/database"; import { broadcastEvent } from "~/server/streams"; -import { ApiSession } from "~/shared/types/api"; +import type { ApiSession } from "~/shared/types/api"; export default defineEventHandler(async (event): Promise => { let session = await getServerSession(event, false); diff --git a/server/api/auth/ap/telegram-login.post.ts b/server/api/auth/ap/telegram-login.post.ts index d3c69fd..25a610b 100644 --- a/server/api/auth/ap/telegram-login.post.ts +++ b/server/api/auth/ap/telegram-login.post.ts @@ -4,10 +4,10 @@ */ import * as fs from "node:fs/promises"; import type { H3Event } from "h3"; -import { string, z } from "zod/v4-mini"; +import { z } from "zod/v4-mini"; import { readAuthenticationMethods, readUsers } from "~/server/database"; import { type TelegramAuthData, telegramAuthDataSchema } from "~/shared/types/telegram"; -import { ApiSession } from "~/shared/types/api"; +import type { ApiSession } from "~/shared/types/api"; const loginSchema = z.object({ authData: telegramAuthDataSchema, diff --git a/server/streams.ts b/server/streams.ts index 6daf522..111c9a2 100644 --- a/server/streams.ts +++ b/server/streams.ts @@ -2,7 +2,7 @@ SPDX-FileCopyrightText: © 2025 Hornwitser SPDX-License-Identifier: AGPL-3.0-or-later */ -import { readUsers, ServerSession } from "~/server/database"; +import { readUsers, type ServerSession } from "~/server/database"; import type { ApiAccount, ApiEvent } from "~/shared/types/api"; import { serverSessionToApi } from "./utils/session"; import { H3Event } from "h3"; diff --git a/server/tsconfig.json b/server/tsconfig.json index e3135ac..b677c91 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -3,5 +3,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later */ { - "extends": "../.nuxt/tsconfig.server.json" + "extends": "../.nuxt/tsconfig.server.json", + "compilerOptions": { + "verbatimModuleSyntax": true, + }, }