-
Hi! My use case is as follows: I implement game logic in the server using lua. I want to have some kind of contract with the FE (which will be written in TS). As long as I can describe a state payload to benefit from type checking and autocompletion when coding the FE I am fine. So I can add types to the game modules and export them types using doc generation. I would then need to transform the JSON into TS types. Do you think this is feasible and sound? How stable is the exported JSON format? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You might be better off working the other way round using TypeScript to Lua |
Beta Was this translation helpful? Give feedback.
-
I believe that by using simple regular expressions, we can transform the TypeScript code into a hint file with luacats, which will provide better suggestions. |
Beta Was this translation helpful? Give feedback.
-
I started writing a PoC and I realised that what I need is the opposite: the schema/types are driven by the needs of the frontend. So since I am writing the FE in TS, I hope that in the rich TS ecosystem I'll find some tool to do this. |
Beta Was this translation helpful? Give feedback.
I started writing a PoC and I realised that what I need is the opposite: the schema/types are driven by the needs of the frontend. So since I am writing the FE in TS, I hope that in the rich TS ecosystem I'll find some tool to do this.