Since

1.0.0

Type Parameters

  • P

  • A = any

  • O = A

  • I = unknown

Hierarchy

  • Type<A, O, I>
    • PartialType

Constructors

  • Type Parameters

    • P

    • A = any

    • O = A

    • I = unknown

    Parameters

    • name: string
    • is: Is<A>
    • validate: Validate<I, A>
    • encode: Encode<A, O>
    • props: P

    Returns PartialType<P, A, O, I>

Properties

_A: A

Since

1.0.0

_I: I

Since

1.0.0

_O: O

Since

1.0.0

_tag: "PartialType"

Since

1.0.0

encode: Encode<A, O>

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

is: Is<A>

a custom type guard

name: string

a unique name for this codec

props: P
validate: Validate<I, A>

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

Methods

  • Since

    1.0.0

    Returns Decoder<I, A>

  • Since

    1.0.0

    Returns Encoder<A, O>

  • a version of validate with a default context

    Since

    1.0.0

    Parameters

    • i: I

    Returns Validation<A>

  • Since

    1.0.0

    Type Parameters

    • B

    • IB

    • A

    • OB

    Parameters

    • this: Type<A, O, I>
    • ab: Type<B, OB, IB>
    • Optional name: string

    Returns Type<B, O, I>

Generated using TypeDoc