import { TreeNode } from "../tree" ; export const isTreeLeaf = ( node ) : boolean => { if ( node . isLeaf === undefined ) { return node . children === undefined ; } else { return node . isLeaf ; } } ;