Show HN: JTC – JSON/YAML Type Checker Using TypeScript (github.com)

2 points by disjukr ↗ HN
If you add a $schema field to JSON or YAML, you can run JSON Schema validation. Likewise, if you add a $type field, this tool performs TypeScript-based checks.

It provides both a VSCode extension and a CLI.

The VSCode extension offers Diagnostics (it draws a red underline when something is wrong) and a Go To Definition feature. Since it’s published on both the Marketplace and open-vsx, the extension can also be used in other VSCode-based editors such as Cursor.

The CLI provides check and lsp commands. With the check command, you can run JSON type checks in CI/CD, and with the lsp command, it can be integrated and used in editors other than VSCode.

I’m planning to soon implement type-based field auto-completion and a feature that shows documentation on mouse hover. I’m also considering adding type checking using other static type languages besides TypeScript.

0 comments

[ 1.7 ms ] story [ 12.1 ms ] thread

No comments yet.