22 lines
497 B
TypeScript
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";
|
|
}
|