MCPcopy Create free account
hub / github.com/Effect-TS/effect / optionFromOptionalKey

Function optionFromOptionalKey

packages/effect/src/SchemaTransformation.ts:1324–1329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1322 * @since 4.0.0
1323 */
1324export function optionFromOptionalKey<T>(): Transformation<Option.Option<T>, T> {
1325 return transformOptional({
1326 decode: Option.some,
1327 encode: Option.flatten
1328 })
1329}
1330
1331/**
1332 * Decodes optional values into `Option<T>` and encodes `Option.none()` back to

Callers

nothing calls this directly

Calls 1

transformOptionalFunction · 0.70

Tested by

no test coverage detected