Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StructureChecker<T>

Essential structure of the validation provider

Type parameters

  • T

    Specified type of data which is being validated

Hierarchy

  • StructureChecker

Callable

  • __call(data: any): data is T
  • Essential structure of the validation provider

    Parameters

    • data: any

      Input data to be validated

    Returns data is T

    Returns that if the data structure fits in the specified type or not

Index

Methods

Methods

cast

  • cast<C>(data: T extends C ? C : never): T
  • throws

    TypeCastException - Throws TypeCastException if the data doesn't fit into specified type

    Type parameters

    • C

      Dummy type parameter which extends T

    Parameters

    • data: T extends C ? C : never

      The input data to be checked that if it fits in the structure or not

    Returns T

    Returns input data as T if it fits into T, throws TypeCastException otherwise.

Generated using TypeDoc