Node
Usage
import { Node } from '@xethya/utils';
const numericNode = new Node<number>(42);
console.log(numericNode.value); // 42Connecting Nodes using a StackNode
import { StackNode } from '@xethya/utils';
const nodeA = new StackNode<number>(1);
const nodeB = new StackNode<number>(2);
const nodeC = new StackNode<number>(3);
// Nodes are now linked!
nodeA.next = nodeB;
nodeB.next = nodeC;Last updated
Was this helpful?