Today, the only way to add customize metarpheus-io-ts output is to add stuff in the prelude. However this has some issues:
it's fairly inconvenient and error prone to write, and it can get out of sync with the latest improvements in codegen
it's impossible to generate stuff that depends on existing pieces of output (because the prelude is at the top of the file)
I propose to expose the io-ts-codegen API directly in metarpheus config, so that custom types can be added more naturally and participate in the topological sorting done by io-ts-codegen.
The entry point would be something that accepts an array of io-ts-codegen Nodes.
Today, the only way to add customize metarpheus-io-ts output is to add stuff in the prelude. However this has some issues:
I propose to expose the io-ts-codegen API directly in metarpheus config, so that custom types can be added more naturally and participate in the topological sorting done by io-ts-codegen.
The entry point would be something that accepts an array of io-ts-codegen
Node
s.