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

x/rimbu/collection-types/set-custom/interface/base.ts>RSetBase.NonEmpty

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

Methods

stream(): Stream.NonEmpty<T>

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

add(value: T): WithElem<Tp, T>["nonEmpty"]

Returns the collection with given value added.

addAll(values: StreamSource<T>): WithElem<Tp, T>["nonEmpty"]

Returns the collection with the values in given values StreamSource added.

union(other: StreamSource<T>): WithElem<Tp, T>["nonEmpty"]

Returns a collection containing all values from this collection and all values of given other StreamSource.