File

src/tree/node.ts

Index

Properties

Constructor

constructor(value: T, branchNodes: Node<T>[])
Parameters :
Name Type Optional
value T No
branchNodes Node<T>[] No

Properties

branchNodes
Type : Node<T>[]
id
Type : number
value
Type : T
import { v4 as uuidv4 } from 'uuid';

export default class Node<T> {
    id: number;
    value: T;
    branchNodes: Node<T>[];
    //right: Node<T>[];

    constructor(value: T, branchNodes: Node<T>[]) {
        this.id = uuidv4();
        this.value = value;
        this.branchNodes = branchNodes;
    }
}

results matching ""

    No results matching ""