Validate Record values with morphs

Is it possible to do more advanced validation on Records? Ideally I'd like to apply any morph to each item in a Record.

const nullNumber = type('number').pipe((s) => s ? Number(s) : null);

const obj = type({
  searches: 'Record<string, ???>'
});


In the ??? place, I'd like to validate against nullNumber, is it possible?
Was this page helpful?