/** * Mnemonist BKTree Typings * ========================= */ type DistanceFunction = (a: T, b: T) => number; export default class BKTree { // Members distance: DistanceFunction; size: number; // Constructor constructor(distance: DistanceFunction); // Methods add(item: T): this; search(n: number, query: T): Array<{item: T, distance: number}>; toJSON(): object; inspect(): any; // Statics static from(iterable: Iterable | {[key: string]: I}, distance: DistanceFunction): BKTree; }