Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: