generate_typescript
Convert JSON data or JSON Schema into TypeScript interfaces and types. Supports nested structures, arrays, optional fields, enums, unions, and records.
Instructions
Generate TypeScript interfaces and types from JSON data or a JSON Schema. Handles nested objects, arrays, optional fields, enums, union types, and Record types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | Sample JSON data to convert to TypeScript types. Provide either this or 'schema'. | |
| schema | No | A JSON Schema to convert to TypeScript types. Provide either this or 'json'. | |
| root_name | No | Name for the root interface/type (default: 'Root') |