GitHub

API reference for Decode.

decode(transformation): apply with .pipe.

Functions

__init__

__init__(transformation) -> None
ParameterTypeDescription
transformationTransformation[Any, Any, Any, Any]
def __init__(self, transformation: Transformation[Any, Any, Any, Any]) -> None:
    self._transformation = transformation

__call__

__call__[E, RD2 = Never, RE2 = Never](schema) -> DecodeToSchema[T_co, E, RD_co | RD2, RE_co | RE2]
ParameterTypeDescription
schemaCodec[T_co, E, RD2, RE2]

Returns DecodeToSchema[T_co, E, RD_co | RD2, RE_co | RE2]

def __call__[E, RD2 = Never, RE2 = Never](
    self, schema: Codec[T_co, E, RD2, RE2], /
) -> DecodeToSchema[T_co, E, RD_co | RD2, RE_co | RE2]:
    return _make(schema, to_type(schema), self._transformation)