Demo:可视化 API response interface
TypeScript interface 用图能看清嵌套引用和 optional 字段,适合 SDK 和前后端契约。
- 先用一个小而完整的示例确认结构,再粘贴完整生产内容。
- 检查预览是否清楚展示 ownership、结构、标签和风险字段。
- 保留源码和导出结果,方便后续 reviewer 复现。
interface ApiResponse<T> { data: T; error?: ApiError; }
interface ApiError { code: string; message: string; }