()
| 1186 | * @since 4.0.0 |
| 1187 | */ |
| 1188 | export function optionFromNullOr<T>(): Transformation<Option.Option<T>, T | null> { |
| 1189 | return transform({ |
| 1190 | decode: Option.fromNullOr, |
| 1191 | encode: Option.getOrNull |
| 1192 | }) |
| 1193 | } |
| 1194 | |
| 1195 | /** |
| 1196 | * Decodes `T | undefined` into `Option<T>` and encodes `Option.none()` back to |
nothing calls this directly
no test coverage detected