It would be great if the documentation would contain a mapping between methods of the stable and experimental APIs. This would help to translate prior knowledge / work to the new API.
My current case: Given this code from #601 from @lingard
How would this translate to the experimental API? I have a use case (filter DSL) that would benefit from this
import * as t from 'io-ts'
const stringify = <T extends t.Props>(type: t.TypeC<T>) =>
t.record(t.keyof(type.props), t.string)
const config = t.type({
hostname: t.string,
port: t.number
})
const stringified = stringify(config)
type Stringified = t.TypeOf<typeof stringified>
// type Stringified = {
// hostname: string;
// port: string;
// }
My use case
type Filter<A> = {field: keyof A; value: O.Option<A[keyof A]>}
// How to translate the concept of keyof to io-ts (experimental API)?
📖 Documentation
It would be great if the documentation would contain a mapping between methods of the stable and experimental APIs. This would help to translate prior knowledge / work to the new API.
My current case: Given this code from #601 from @lingard How would this translate to the experimental API? I have a use case (filter DSL) that would benefit from this
My use case