final class OptionOps[T] extends AnyVal
If you want js.UndefOr, use JSConverters .toOption
and .orUndefined
.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- OptionOps
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def ??[B >: T](default: => B): B
- def ???[B >: T](other: Option[B]): Option[B]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def filterNull: Option[T]
Filter nulls out in case it *might* be null.
- def filterTruthy: Option[T]
If Some and value is truthy according to JS, then keep it, otherwise become a None.
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def orElseNull: Option[T]
If Some, keep the value, else set the value to null.
- def toString(): String
- Definition Classes
- Any
Deprecated Value Members
- def toNonNullOption: Option[T]
Filter nulls out in case it *might* be null.
Filter nulls out in case it *might* be null.
- Deprecated
USe filterNull.