Mapping types
Hello, is it possible do to code like this?
And if so, is it possible to also inherit those types while mapping in logic, like so?
And if so, is it possible to also inherit those types while mapping in logic, like so?
const x = type({
a: 'string',
b: 'string',
c: 'string'
})
const xType = typeof x;
const y = x.map((original) => ({
...original,
c: 'number'
}))
const yType = typeof y;const y = x.logicMap((original) => ({
...original,
c: Number(original.c)
}))
const yType = typeof y;