Effect CommunityEC
Effect Community3y ago
67 replies
imagio

Handling `null | undefined` values in optional fields of a struct and replacing them with a default

With optional fields in a struct how can I treat null | undefined values in a field as if the field were missing and replace them with a default? I don't see a builtin for this, should I just use a transformer?
Was this page helpful?