Add types.ts

This commit is contained in:
2025-07-25 12:01:48 +03:00
parent b38ac3eb7e
commit 16bc137e53

13
types.ts Normal file
View File

@@ -0,0 +1,13 @@
// Data structure for successful responses
export interface SuccessResponse<T> {
success: true;
data: T;
}
// Data structure for error responses
export interface ErrorResponse {
success: false;
error: string;
}
export type ApiResponse<T> = SuccessResponse<T> | ErrorResponse;