import type {ImmutableTree} from './types'; export type ValidateResult = | {readonly valid: true} | { readonly valid: false, readonly tree: ImmutableTree, readonly subtree: 'left' | 'right', }; export default function validate( tree: ImmutableTree, cmp: (a: T, b: T) => number, ): ValidateResult;