Boris Cherny
Boris Cherny
@joseSantacruz What’s your use case for generic and conditional types in JSON-Schema?
This is a bug, and I agree with the proposed behavior. We should also update empty schemas (see test/e2e/emptySchema.ts) to emit: ```ts // Expected type EmptySchema = unknown // Actual...
Hey there! This is the expected behavior. See https://github.com/bcherny/json-schema-to-typescript/blob/335c42568da67f8782e93faed73764582303c4f0/test/testCLI.ts#L30. To output to a directory, use `-o` or `-o src`: https://github.com/bcherny/json-schema-to-typescript/blob/335c42568da67f8782e93faed73764582303c4f0/test/testCLI.ts#L104. I'll leave this issue open to collect feedback. We can...
This is a really cool idea! I wonder if we could use a more general utility for caching. Something like: ```sh cat schema.json | fromCache | json2ts | toCache >...
Proposals for how to do this welcome! How exactly should this work when using multiple input files, multiple output files, etc.?
Hi @AndyDBell! You can avoid declaring externally referenced types by setting the `declareExternallyReferenced` option to `false`. In the future, you'll be able to use [batch mode](https://github.com/bcherny/json-schema-to-typescript/issues/16) to generate a set...
Hmm could you upload a self-contained repro case? This does seem like a bug. In the meantime, generating multiple copies of a type should be fine - TypeScript will merge...
Thanks for the repro case @AndyDBell. What's happening here is that `declareExternallyReferenced` isn't working as expected for primitive types (as opposed to interfaces). I maintain this project in my spare...
Hey there! JSTT tries not to emit runtime code (notable exception: Enums). Let's leave this open, and see if others request this. As a workaround, add `tsEnumNames` to your enum...
This is a neat idea, but my hunch is it'll be pretty hard to do in practice. Do you want to flush out (in this issue, or with code) what...