Files
tgex-frontend/lib/types/common.ts
2025-11-10 12:07:24 +03:00

22 lines
497 B
TypeScript

// ============================================================================
// Common Types
// ============================================================================
export type LoadingState = "idle" | "loading" | "success" | "error";
export interface AsyncState<T> {
data: T | null;
loading: boolean;
error: string | null;
}
export interface PaginationParams {
page?: number;
limit?: number;
}
export interface SortParams {
sort_by?: string;
order?: "asc" | "desc";
}