Since

1.0.0

Type Parameters

Hierarchy

  • Type<T["_A"] | undefined, T["_O"] | undefined, T["_I"] | undefined>
    • OptionalType

Constructors

Properties

Methods

Constructors

Properties

_A: undefined | T["_A"]

Since

1.0.0

_I: undefined | T["_I"]

Since

1.0.0

_O: undefined | T["_O"]

Since

1.0.0

encode: Encode<undefined | T["_A"], undefined | T["_O"]>

converts a value of type A to a value of type O

is: Is<undefined | T["_A"]>

a custom type guard

name: string

a unique name for this codec

type: T
validate: Validate<undefined | T["_I"], undefined | T["_A"]>

succeeds if a value of type I can be decoded to a value of type A

Methods

  • Since

    1.0.0

    Returns Decoder<undefined | T["_I"], undefined | T["_A"]>

  • Since

    1.0.0

    Returns Encoder<undefined | T["_A"], undefined | T["_O"]>

  • a version of validate with a default context

    Since

    1.0.0

    Parameters

    • i: undefined | T["_I"]

    Returns Validation<undefined | T["_A"]>

  • Since

    1.0.0

    Type Parameters

    • B

    • IB

    • A

    • OB

    Parameters

    • this: Type<A, undefined | T["_O"], undefined | T["_I"]>
    • ab: Type<B, OB, IB>
    • Optional name: string

    Returns Type<B, undefined | T["_O"], undefined | T["_I"]>

Generated using TypeDoc