/** * Mnemonist VPTree Typings * ========================= */ type DistanceFunction = (a: T, b: T) => number; type QueryMatch = {distance: number, item: T}; export default class VPTree { // Members distance: DistanceFunction; size: number; D: number; // Constructor constructor(distance: DistanceFunction, items: Iterable); // Methods nearestNeighbors(k: number, query: T): Array>; neighbors(radius: number, query: T): Array>; // Statics static from( iterable: Iterable | {[key: string]: I}, distance: DistanceFunction ): VPTree; }