Open amirhmk opened 9 months ago
Is there any way to define a BaseResponse in the api-types.ts file so that it can be used in the rest of the responces?
BaseResponse
api-types.ts
Something like:
interface BaseResponse { total: number; page_size: number; page: number; prev_page: string; next_page: string; } interface ApiResponse extends BaseResponse { // BaseResponse would get destructure here implicitly data: SpecificRecordsResponse[] }
I tried the above approach, but it does not work out of the box. Not sure if there is another way or a config change that can make this happen?
Is there any way to define a
BaseResponse
in theapi-types.ts
file so that it can be used in the rest of the responces?Something like:
I tried the above approach, but it does not work out of the box. Not sure if there is another way or a config change that can make this happen?