Show HN: Keep track of why you muted someone on X (github.com)
5 points by klntsky 3d ago 3 comments
Show HN: What Are People Doing Now? (whatpeopledoingnow.com)
2 points by mazzystar 8h ago 0 comments
Show HN: Gen-ts-type – Code Generate TS Type from JSON data with collapsed field
1 aabbcc1241 0 5/21/2025, 2:03:44 AM gen-ts-type.surge.sh ↗
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!
No comments yet