Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Const disjoint

  • disjoint applies a record of preconditions to a javascript object producing a new object with the final value of each precondition and the values of any additional properties in the input object.

    If any of the preconditions fail, the whole object is considered a failure.

    Type parameters

    • A

    • B

    • R: Record<B>

    Parameters

    Returns Precondition<Record<A>, R>

Const intersect

  • intersect applies only the properties in a record of preconditions that exist in the target input object. The resulting value is an object with properties that exist in the input object that have had a matching precondition applied.

    If any of the preconditions fail, the whole object is considered a failure.

    Type parameters

    • A

    • B

    • R: Record<B>

    Parameters

    Returns Precondition<Record<A>, R>

Const isRecord

  • isRecord tests if the value is an js object (and not an Array).

    Type parameters

    • A

    Parameters

    Returns Result<Type, Record<A>>

Const map

  • map applies the same Precondition to each property of an object.

    If any of the preconditions fail, the whole object is considered a failure.

    Type parameters

    • A

    • B

    • R: Record<B>

    Parameters

    Returns Precondition<Record<A>, R>

Const restrict

  • restrict applies a record of preconditions to an input object keeping only those properties that have a matching precondition.

    If any of the preconditions fail, the whole object is considered a failure.

    Type parameters

    • A

    • B

    • R: Record<B>

    Parameters

    Returns Precondition<Record<A>, R>

Const union

  • union applies a record of preconditions to an input object.

    Union results in an object that has both the results of applied preconditions for found properties and any additional properties on the input object.

    If any of the preconditions fail, the whole object is considered a failure.

    Type parameters

    • A

    • B

    • R: Record<B>

    Parameters

    Returns Precondition<Record<A>, R>

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Class with type parameter

Generated using TypeDoc