Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArgumentAssertionBuilder<T>

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Properties

argument

argument: T

argumentName

argumentName: string

Methods

isNotNull

  • isNotNull(): this

isNotNullOrUndefined

  • isNotNullOrUndefined<T>(): this

isNotUndefined

  • isNotUndefined(): this

isOneOf

  • isOneOf(...options: T[]): this
  • Determines whether the argument is one of the specified options.

    Parameters

    • Rest ...options: T[]

    Returns this

isTypeOf

  • isTypeOf<T2>(type: ConstructorFor<T2>): this
  • Ensures the argument is of the type

    Type parameters

    • T2

    Parameters

    • type: ConstructorFor<T2>

      The type

    Returns this

matches

  • matches(predicate: Func1<T, boolean>, message?: undefined | string): this
  • Asserts on the value of predicate to whether the assertion is valid.

    Parameters

    • predicate: Func1<T, boolean>

      The predicate to test to see if the assertion is valid.

    • Optional message: undefined | string

      The message to use if the assertion is invalid.

    Returns this

Generated using TypeDoc