Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | // types.ts
export interface IComponentRepository<T> {
getAll: (url: string) => Promise<{ total: number; data: Array<T> }>;
getById: (url: string, id: string) => Promise<T>;
getByQueryParams: (url: string, queryParams: string) => Promise<T>;
}
export interface RepositoryConfig {
baseUrl: string;
tag: string;
enabled?: boolean;
}
export type RepositoryConfigs<K extends string> = {
[key in K]: RepositoryConfig;
}
// Define a type for mapping repository keys to their data types
export type RepositoryDataTypes = {
[key: string]: any;
} |