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

x/rimbu/graph/custom/common/index.ts>GraphElement

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace GraphElement
Re-export
import { GraphElement } from "https://deno.land/x/rimbu@0.13.5/graph/custom/common/index.ts";

Functions

Returns the values of the link graph element if the given element e is a Link element, or undefined otherwise.

Returns the element at the given key in the graph element e, if the element is a Link element, or returns the given otherwise value otherwise.

Returns the value of a single node graph element if the given element e is a single node, or the given otherwise fallback value otherwise.

Returns true if the given graph element e is a 2-tuple. Instructs the compiler that the type is a 2-tuple.

Returns true if the given graph element e is a single node. Instructs the compiler that the type is a 1-tuple.

type alias GraphElement
Re-export
import { type GraphElement } from "https://deno.land/x/rimbu@0.13.5/graph/custom/common/index.ts";

A graph element is either an isolated node as a 1-tuple, or a link between nodes represented as a Link instance.

definition: [N] | Link<N>