Converting Record Types with Optional Values in TypeScript

Hello, I'd like to convert a record from this shape
{
  keya: string;
  keyb: number;
  keyc: string | null;
  keyd: string | undefined;
}


to this shape:

{
  keya: string;
  keyb: number;
  keyc: Option.Option<string>;
  keyd: Option.Option<string>;
}


Is there a function in the record module to do that ?
Was this page helpful?