json-schema-to-typescript icon indicating copy to clipboard operation
json-schema-to-typescript copied to clipboard

compileSync

Open mmkal opened this issue 1 month ago • 0 comments

Hi!

At iterate, we have a usecase where we want to turn some inline json-schema objects into typescript, inside a non-async function. There are no remote refs, and we don't need prettier, so I poked around to see if it would be possible. Turns out to be pretty easy, and you can even support remote refs by just passing them in. I added a compileSync overload for it.

For anyone interested, I published to npm under @mmkal/json-schema-to-typescript but it'd be great if this could be merged into this lib.

mmkal avatar Nov 11 '25 17:11 mmkal