Interface Some<THING>

interface Some<THING> {
    and: (<NEW_THING>(other) => Maybe<[THING, NEW_THING]>);
    inspect: (() => string);
    isNothing: false;
    mBind: (<NEW_THING>(f) => Maybe<NEW_THING>);
    map: (<NEW_THING>(f) => Some<NEW_THING>);
    or: ((f) => Some<THING>);
    orElse: ((fallback) => THING);
    orNull: (() => THING);
    toResult: ((fallback) => Success<THING>);
}

Type Parameters

  • THING

Properties

and: (<NEW_THING>(other) => Maybe<[THING, NEW_THING]>)

Type declaration

inspect: (() => string)

Type declaration

    • (): string
    • Returns string

isNothing: false
mBind: (<NEW_THING>(f) => Maybe<NEW_THING>)

Type declaration

map: (<NEW_THING>(f) => Some<NEW_THING>)

Type declaration

or: ((f) => Some<THING>)

Type declaration

orElse: ((fallback) => THING)

Type declaration

    • (fallback): THING
    • Parameters

      • fallback: unknown

      Returns THING

orNull: (() => THING)

Type declaration

toResult: ((fallback) => Success<THING>)

Type declaration