Since

1.0.0

Type Parameters

  • D extends Any

  • C extends Any

  • A = any

  • O = A

  • I = unknown

Hierarchy

  • Type<A, O, I>
    • DictionaryType

Constructors

  • Type Parameters

    • D extends Any<D>

    • C extends Any<C>

    • A = any

    • O = A

    • I = unknown

    Parameters

    • name: string
    • is: Is<A>
    • validate: Validate<I, A>
    • encode: Encode<A, O>
    • domain: D
    • codomain: C

    Returns DictionaryType<D, C, A, O, I>

Properties

_A: A

Since

1.0.0

_I: I

Since

1.0.0

_O: O

Since

1.0.0

_tag: "DictionaryType"

Since

1.0.0

codomain: C
domain: D
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

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