npm.io
3.0.5 • Published 2 years ago

@types/kdbush

Licence
MIT
Version
3.0.5
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/kdbush

Summary

This package contains type definitions for kdbush (https://github.com/mourner/kdbush).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kdbush.

index.d.ts

type Points = number[][];
type Get<T> = (point: T) => number;
type ArrayType =
    | typeof Int8Array
    | typeof Int16Array
    | typeof Int32Array
    | typeof Float32Array
    | typeof Float64Array
    | typeof Uint8Array
    | typeof Uint16Array
    | typeof Uint32Array
    | typeof Array;

declare class KDBush<T> {
    constructor(points: Points);
    constructor(points: T[], getX: Get<T>, getY: Get<T>, nodeSize?: number, ArrayType?: ArrayType);
    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;

export as namespace KDBush;

Additional Details

  • Last updated: Tue, 07 Nov 2023 2000 GMT
  • Dependencies: none

Credits

These definitions were written by DenisCarriere, and SangYeob Bono Yu.