export type Comparator = (a: T, b: T) => number; export type DFSOrderPattern = 'pre' | 'in' | 'post'; export type MapCallback = (node: N) => any; export type MapCallbackReturn = ReturnType>; export enum CP {lt = 'lt', eq = 'eq', gt = 'gt'}