3.0.5 • Published 6 months ago

@types/kdbush v3.0.5

Weekly downloads
3,797
License
MIT
Repository
github
Last release
6 months ago

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/v1.

index.d.ts

// Type definitions for kdbush 1.0
// Project: https://github.com/mourner/kdbush
// Definitions by: DenisCarriere <https://github.com/DenisCarriere>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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

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

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:34:59 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by DenisCarriere.

3.0.4

7 months ago

3.0.3

8 months ago

3.0.5

6 months ago

1.0.7

6 months ago

1.0.6

7 months ago

1.0.5

8 months ago

3.0.2

2 years ago

3.0.1

2 years ago

1.0.4

2 years ago

1.0.3

5 years ago

3.0.0

5 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago