abstract class EmptyBase
A shared base class for empty collection instances.
It implements the common Collection API for the empty case and is reused across different collection types. All mutating-style operations return this, and all querying operations return the empty value for their respective type.
sealed
Properties
Methods
[Symbol.iterator]
Returns an empty iterator.
[Symbol.iterator]Definition
[Symbol.iterator](): FastIterator<any>;
assumeNonEmpty
Throws a RimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.
assumeNonEmptyRimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.nonEmpty
Returns false, keeping the type narrowed to the empty variant.
nonEmptyfalse, keeping the type narrowed to the empty variant.Definition
nonEmpty(): this is this['_NonEmptyType'];