UNPKG

api-response-utils

Version:

The api-response-utils package streamlines RESTful API data exchange by introducing a standardized data structure for HTTP response bodies. This structure simplifies client-side data handling, promoting consistency and readability in your API interactions

11 lines (10 loc) 219 B
/** * API Response * The response object that is sent to the client via the HTTP body. */ interface IAPIResponse<T> { success: boolean; data: T; error: string | undefined; } export type { IAPIResponse };