Demo: visualize API response interfaces
TypeScript interfaces become easier to review when nested object references and optional fields are visible. This is helpful for SDK docs and frontend/backend contracts.
- Show optional properties clearly.
- Keep aliases and interfaces connected when one references another.
- Use the diagram before changing public SDK types.
interface ApiResponse<T> {
data: T;
error?: ApiError;
}
interface ApiError { code: string; message: string; }