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

x/rimbu/graph/custom/index.ts>ValuedGraphElement.getLinkElement

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function ValuedGraphElement.getLinkElement
import { ValuedGraphElement } from "https://deno.land/x/rimbu@0.13.0/graph/custom/index.ts";
const { getLinkElement } = ValuedGraphElement;

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.

Parameters

  • the graph element
key: K
  • the link key

Returns

ValuedLink<N, V>[K] | undefined