Gen-ts-type – Code Generate TS Type from JSON data with collapsed field
Gen-ts-type – Code Generate TS Type from JSON data with collapsed field
I built a tool to generate TypeScript types from JSON/JS data, initially to tackle the deeply nested arrays in for a few JSON RPC API (e.g., array[0].content.section.contents[0].item.contents[0] could be a aItem or bItem). Some existing tools generate named union types at every level, which can get messy. This tool automatically converts fields to optional at the right depth, making the types cleaner and easier to use. Features: - Web UI: Paste JSON, get TypeScript types instantly - CLI or importable in TypeScript projects - Handles complex types (nested objects, arrays, etc.) - Supports optional fields and union types where needed Try the Web UI: https://gen-ts-type.surge.sh Also published on github and npm as gen-ts-type Feedback welcome!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
ReJSON – a JSON data type for Redis
The Tabular Data Type
GMP Deserialization Type Confusion Vulnerability [MyBB
Co-Occurrence of Type in Pokémon
Type someone's name and find out how to pronounce it
Hindley–Milner type inferencing in C
Hash any comparable type in Go
I simulated Bigtable in BigQuery as a Type 2 SCD
KeyVocab – drill vocab while you type
a type-agnostic wrapper of leveldb for Go