// Type definitions for kdbush 1.0 // Project: https://github.com/mourner/kdbush // Definitions by: DenisCarriere // Christian Scott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped type Points = number[][]; type Get = (point: T) => number; type ArrayType = typeof Int8Array | typeof Int16Array | typeof Int32Array | typeof Float32Array | typeof Float64Array | typeof Array; declare function kdbush(points: Points): kdbush.KDBush; declare function kdbush( points: T[], getX: Get, getY: Get, nodeSize?: number, ArrayType?: ArrayType ): kdbush.KDBush; declare namespace kdbush { class KDBush { ids: number[]; coords: number[]; nodeSize: number; points: T[]; range(minX: number, minY: number, maxX: number, maxY: number): number[]; within(x: number, y: number, r: number): number[]; } } export = kdbush;