Properties
Private _arr
_arr: Array < T >
Private _isDefined
_isDefined: boolean
Private _isEmpty
_isEmpty: boolean
Private Optional _value
_value: T
Methods
equals
equals( other: Opt < T > ) : boolean
Parameters
Returns boolean
flatMap
flatMap<U>( f: function ) : Opt < U >
Type parameters
Parameters
f: function
Parameters
Returns Opt < U >
Returns Opt < U >
forEach
forEach( fn: function ) : void
getOrElseF
getOrElseF( v: function ) : T
map
map<U>( f: function ) : Opt < U >
Type parameters
Parameters
Returns Opt < U >
Static empty
Type parameters
Returns Opt < T >
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
You can always create an empty option by hand just by calling new Opt()
but calling this method will return a global instance instead of allocating a new one each time