Since

1.5.3

Type Parameters

Hierarchy

  • InterfaceType<P, { [ K in keyof P]: TypeOf<P[K]> }, { [ K in keyof P]: OutputOf<P[K]> }, unknown>
    • TypeC

Properties

_A: { [ K in string | number | symbol]: TypeOf<P[K]> }

Since

1.0.0

_I: unknown

Since

1.0.0

_O: { [ K in string | number | symbol]: OutputOf<P[K]> }

Since

1.0.0

_tag: "InterfaceType"

Since

1.0.0

encode: Encode<{ [ K in string | number | symbol]: TypeOf<P[K]> }, { [ K in string | number | symbol]: OutputOf<P[K]> }>

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

is: Is<{ [ K in string | number | symbol]: TypeOf<P[K]> }>

a custom type guard

name: string

a unique name for this codec

props: P
validate: Validate<unknown, { [ K in string | number | symbol]: TypeOf<P[K]> }>

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

Methods

  • Since

    1.0.0

    Returns Decoder<unknown, { [ K in string | number | symbol]: TypeOf<P[K]> }>

  • Since

    1.0.0

    Returns Encoder<{ [ K in string | number | symbol]: TypeOf<P[K]> }, { [ K in string | number | symbol]: OutputOf<P[K]> }>

  • a version of validate with a default context

    Since

    1.0.0

    Parameters

    • i: unknown

    Returns Validation<{ [ K in string | number | symbol]: TypeOf<P[K]> }>

  • Since

    1.0.0

    Type Parameters

    • B

    • IB

    • A

    • OB

    Parameters

    • this: Type<A, { [ K in string | number | symbol]: OutputOf<P[K]> }, unknown>
    • ab: Type<B, OB, IB>
    • Optional name: string

    Returns Type<B, { [ K in string | number | symbol]: OutputOf<P[K]> }, unknown>

Generated using TypeDoc