refacto: error and types

This commit is contained in:
Julien Froidefond
2025-02-27 21:59:14 +01:00
parent ea51ff53a9
commit 279f6c6e88
37 changed files with 800 additions and 684 deletions

View File

@@ -1,5 +1,4 @@
import { KomgaUser } from "./komga";
import { ErrorCode } from "@/constants/errorCodes";
export interface AuthConfig {
serverUrl: string;
@@ -11,10 +10,3 @@ export interface AuthState {
user: KomgaUser | null;
serverUrl: string | null;
}
export interface AuthError {
code: ErrorCode;
}
// Deprecated - Use ErrorCode from @/constants/errorCodes instead
export type AuthErrorCode = ErrorCode;

7
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import { ErrorCode } from "@/constants/errorCodes";
export interface AppErrorType extends Error {
code: ErrorCode;
message: string;
name: string;
}