of<A> static method

Option<A> of<A>(
  1. A? a
)

Return None if null else Some of A

Implementation

static Option<A> of<A>(A? a) => a != null ? _some(a) : _none();