Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/collection-types/set-custom/index.ts>VariantSetBase.NonEmpty

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

Properties

readonly
isEmpty: false

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

Methods

nonEmpty(): true

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

assumeNonEmpty(): this

Returns a self reference 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.

toArray(): ArrayNonEmpty<T>

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