How to lift all the values of an object to option while while preserving the type

Is there any function in fp-ts capable of lifting all values of an object to an option and keep the shape of the type? The cherry on top will be to be able to not transform any value that is already option. Something like this:

({ a: string, b: Option<number> }) => { a: Option<string>,  b: Option<number>}

Leave a Comment