Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Nothing<T>

Type parameters

  • T

Hierarchy

  • Nothing

Implements

Index

Constructors

constructor

  • Type parameters

    • T

    Returns Nothing<T>

Methods

apply

  • apply<U>(_maybe: Maybe<U>): ApplicativeResult<T, U>

caseOf

  • caseOf<U>(matcher: CaseOf<T, U>): U

cata

  • cata<U>(_: (value: NonNullable<T>) => U, nothingFn: () => U): U
  • Type parameters

    • U

    Parameters

    • _: (value: NonNullable<T>) => U
        • (value: NonNullable<T>): U
        • Parameters

          • value: NonNullable<T>

          Returns U

    • nothingFn: () => U
        • (): U
        • Returns U

    Returns U

chain

equals

  • equals(value: Maybe<T>): boolean

equalsValue

  • equalsValue(value: Nullable<T>): boolean

filter

  • filter(_f: (value: T) => boolean): Maybe<T>
  • Parameters

    • _f: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns Maybe<T>

getOrElse

  • getOrElse<U>(defaultValue: U): T | U

isJust

  • isJust(): boolean

isNothing

  • isNothing(): boolean

join

  • join(): JoinMaybe<T>

map

  • map<U>(_f: (value: NonNullable<T>) => U): Maybe<NonNullable<U>>
  • Method implements from Maybe.map

    Type parameters

    • U

    Parameters

    • _f: (value: NonNullable<T>) => U
        • (value: NonNullable<T>): U
        • Parameters

          • value: NonNullable<T>

          Returns U

    Returns Maybe<NonNullable<U>>

or

  • or<T>(f: () => Nullable<T>): Maybe<NonNullable<T>>
  • Method implements from Maybe.or

    Type parameters

    • T

    Parameters

    • f: () => Nullable<T>
        • (): Nullable<T>
        • Returns Nullable<T>

    Returns Maybe<NonNullable<T>>

toEither

  • toEither<U>(leftValue: U): Shape<U, T>
  • Type parameters

    • U

    Parameters

    • leftValue: U

    Returns Shape<U, T>

toString

  • toString(): string

Generated using TypeDoc