io-ts-codegen icon indicating copy to clipboard operation
io-ts-codegen copied to clipboard

New Feature: printC

Open cyberixae opened this issue 5 years ago • 2 comments

This PR is an attempt to implement the printC function that converts a type declaration into codec type signature. This is my best effort of implementing all the features. I'm not sure if all of this works. In particular I'm unsure of how to deal with the recursive and custom types involved. I'm planning to test some of this in practice to see if I can solve some of the problems I have encountered with huge inlined declarations resulting from automated json schema conversion.

cyberixae avatar Sep 08 '20 11:09 cyberixae

I updated the PR based on what seemed to work for me in the json schema converter. It might still problems since I don't use all of the features in the converter.

cyberixae avatar Sep 16 '20 16:09 cyberixae

@gcanti Thanks for this amazing library. It is featuring in ThoughtWorks Radar and that says a lot.

Any chance to review this pull request?

@cyberixae has done nice JsonSchema2TS codegen using this library. This code is used there, but truly belongs here.

husayt avatar Oct 30 '20 11:10 husayt