Hacker News new | ask | show | jobs
by vorticalbox 1030 days ago
You could use this[0] package but you would need to download the schema first into a folder say "schemas" and then add a build step as a script in your package.json '"compile-schemas": "json2ts -i schemas -o types"' to export to a "type" folder

[0] json-schema-to-typescript

1 comments

If it's a one-off you can just use http://borischerny.com/json-schema-to-typescript-browser/ or https://transform.tools/json-schema-to-typescript (they both use the same library).