Mapping types

Hello, is it possible do to code like this?
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;

And if so, is it possible to also inherit those types while mapping in logic, like so?
const y = x.logicMap((original) => ({
  ...original,
  c: Number(original.c)
}))

const yType = typeof y;
Was this page helpful?