3 ms·
Really like what I'm seeing here! I wish instead of a YML file I could provide a `.d.ts` file and you could understand that. That would be much more natural for
by CGamesPlay 5y ago
Really like what I'm seeing here! I wish instead of a YML file I could provide a `.d.ts` file and you could understand that. That would be much more natural for me to code in.
- hpx7 5y agoThat's good feedback for me -- I've been thinking about other ways to define the API format, as manually editing the yml can be error prone. I've thought about making a simple point and click UI which generates a valid hathora.yml, but having the definition in a typesafe language also makes sense to me.
- CGamesPlay 5y agoTo expound on this a bit, for an initial version it might not even need to actually do any type checking or even support `import`. You could literally just use a TypeScript AST in place of the YML structure. It's certainly not as nice as integrating with the actual TypeScript compiler, but since it's a code generator that generates TypeScript, it's not as if it actually needs to do the verification at that stage--it will already happen when the generated TypeScript gets compiled.