TypeScriptToLua
TypeScriptToLua copied to clipboard
Generate schema automatically
Currently, the schema is edited by hand, which is prone to error and prone to becoming outdated.
Instead, in my projects, I use ts-json-schema-generator. You feed it the source file for a TypeScript interface, and it spits out the resulting .json file schema. And you do in your build step so that it is always up to date.
e.g. "build": "tsc && npm run build-lualib",
--> "build": "tsc && npm run build-lualib && npm run generate-schema",