import { Option } from './option' ; /**
 * None is a singleton class that represents emptiness.  It signals that a value that may not exist
 * doesn't exist.
 */ class None_ < A > implements Option < A > { static get INSTANCE ( ) : None_ < never > { return new None_ < never > ( ) ; } get isDefined ( ) : boolean { return false ; } get isEmpty ( ) : boolean { return true ; } private constructor ( ) { } equals < B > ( other ) { return ( other instanceof None_ ) ; } filter ( predicate ) { return this ; } filterNot ( predicate ) { return this ; } flatMap < B > ( flatMapper ) { return None_ . INSTANCE ; } foreach ( run ) { } get ( ) { throw new Option . NoSuchElementError ( ) ; } getOrElse < B , A extends B > ( this , defaultValue ) { return defaultValue ( ) ; } map < B > ( mapper ) { return None_ . INSTANCE ; } match < B > ( matcher ) { return matcher . None ( ) ; } orElse < B , A extends B > ( this , alternative ) { return alternative ( ) ; } } const instance = None_ . INSTANCE ; export { None_ , instance as None } ;