Converting Nullish Fields to Optional in TypeScript
Is there a schema combinator/simple way to turn a "nullish" field into an "optional" one? (I'me fine just coercing
Or, in code:
I can imagine perhaps converting to a proper
null to undefined in this case)Or, in code:
I can imagine perhaps converting to a proper
Option type and then back again...but surely there's a simpler way?