Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/multiset/custom/interface/base.ts>VariantMultiSetBase.NonEmpty

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface VariantMultiSetBase.NonEmpty
implements VariantMultiSetBase<T, Tp>, [Streamable.NonEmpty]<T>
import { type VariantMultiSetBase } from "https://deno.land/x/rimbu@1.2.0/multiset/custom/interface/base.ts";
const { NonEmpty } = VariantMultiSetBase;

Properties

readonly
isEmpty: false

Returns false since this collection is known to be non-empty

readonly
countMap: WithElem<Tp, T>["countMapNonEmpty"]

Returns the Map representation of this collection.

Methods

nonEmpty(): true

Returns true since this collection is known to be non-empty

asNormal(): WithElem<Tp, T>["normal"]

Returns this collection typed as a 'possibly empty' collection.

stream(): Stream.NonEmpty<T>

Returns a non-empty Stream containing all values of this collection.

streamDistinct(): Stream.NonEmpty<T>

Returns a non-empty Stream containing all distinct values of this collection.

toArray(): ArrayNonEmpty<T>

Returns a non-empty array containing all values in this collection.