None
Defined in: src/util/Option.ts:85
No value.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new None():
None
Returns
Section titled “Returns”None
Properties
Section titled “Properties”
readonly_tag:"None"
Defined in: src/util/Option.ts:86
Accessors
Section titled “Accessors”isEmpty
Section titled “isEmpty”Get Signature
Section titled “Get Signature”get isEmpty():
boolean
Defined in: src/util/Option.ts:111
Returns
Section titled “Returns”boolean
nonEmpty
Section titled “nonEmpty”Get Signature
Section titled “Get Signature”get nonEmpty():
boolean
Defined in: src/util/Option.ts:112
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get size():
0|1
Defined in: src/util/Option.ts:113
Returns
Section titled “Returns”0 | 1
Methods
Section titled “Methods”contains()
Section titled “contains()”contains<
U>(_other):boolean
Defined in: src/util/Option.ts:96
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”_other
Section titled “_other”U
Returns
Section titled “Returns”boolean
exists()
Section titled “exists()”exists(
_pred):boolean
Defined in: src/util/Option.ts:93
Parameters
Section titled “Parameters”(value) => boolean
Returns
Section titled “Returns”boolean
filter()
Section titled “filter()”filter(
_pred):Option<never>
Defined in: src/util/Option.ts:91
Parameters
Section titled “Parameters”(value) => boolean
Returns
Section titled “Returns”Option<never>
filterNot()
Section titled “filterNot()”filterNot(
_pred):Option<never>
Defined in: src/util/Option.ts:92
Parameters
Section titled “Parameters”(value) => boolean
Returns
Section titled “Returns”Option<never>
flatMap()
Section titled “flatMap()”flatMap<
U>(_f):Option<U>
Defined in: src/util/Option.ts:89
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”(value) => Option<U>
Returns
Section titled “Returns”Option<U>
fold()
Section titled “fold()”fold<
U>(onNone,_onSome):U
Defined in: src/util/Option.ts:97
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”onNone
Section titled “onNone”() => U
_onSome
Section titled “_onSome”(value) => U
Returns
Section titled “Returns”U
forall()
Section titled “forall()”forall(
_pred):boolean
Defined in: src/util/Option.ts:95
Vacuously true — “all” elements of an empty collection satisfy any predicate.
Parameters
Section titled “Parameters”(value) => boolean
Returns
Section titled “Returns”boolean
forEach()
Section titled “forEach()”forEach(
_f):void
Defined in: src/util/Option.ts:90
Parameters
Section titled “Parameters”(value) => void
Returns
Section titled “Returns”void
getOrElse()
Section titled “getOrElse()”getOrElse<
U>(fallback):U
Defined in: src/util/Option.ts:100
Absent → fallback value (or lazy fallback from a thunk).
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”fallback
Section titled “fallback”U | (() => U)
Returns
Section titled “Returns”U
isNone()
Section titled “isNone()”isNone():
this is None
Defined in: src/util/Option.ts:110
Returns
Section titled “Returns”this is None
isSome()
Section titled “isSome()”isSome():
this is Some<never>
Defined in: src/util/Option.ts:109
Returns
Section titled “Returns”this is Some<never>
map<
U>(_f):Option<U>
Defined in: src/util/Option.ts:88
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”(value) => U
Returns
Section titled “Returns”Option<U>
orElse()
Section titled “orElse()”orElse<
U>(alternative):Option<U>
Defined in: src/util/Option.ts:105
Absent → use the alternative Option (lazy or eager).
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”alternative
Section titled “alternative”Returns
Section titled “Returns”Option<U>
toArray()
Section titled “toArray()”toArray(): []
Defined in: src/util/Option.ts:115
Returns
Section titled “Returns”[]
toNullable()
Section titled “toNullable()”toNullable():
null
Defined in: src/util/Option.ts:116
Returns
Section titled “Returns”null