JSON 转 TypeScript
从 JSON 示例生成 TypeScript interface
根接口名称
输入 JSON
{ "id": 1, "name": "Tools", "tags": ["dev", "json"], "owner": { "email": "hello@example.com", "active": true } }
TypeScript 类型
📋
export interface Root { id: number; name: string; tags: string[]; owner: RootOwner; } export interface RootOwner { email: string; active: boolean; }