@types/javascript-astar
TypeScript icon, indicating that this package has built-in type declarations

0.0.35 • Public • Published

Installation

npm install --save @types/javascript-astar

Summary

This package contains type definitions for javascript-astar (https://github.com/bgrins/javascript-astar).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/javascript-astar.

index.d.ts

declare class Graph {
    grid: GridNode[][];
    constructor(grid: number[][], options?: { diagonal?: boolean | undefined });
}

declare class GridNode {
    x: number;
    y: number;
}

interface Heuristic {
    (pos0: { x: number; y: number }, pos1: { x: number; y: number }): number;
}

interface Heuristics {
    manhattan: Heuristic;
    diagonal: Heuristic;
}

declare namespace astar {
    function search(
        graph: Graph,
        start: { x: number; y: number },
        end: { x: number; y: number },
        options?: {
            closest?: boolean | undefined;
            heuristic?: Heuristic | undefined;
        },
    ): GridNode[];
    var heuristics: Heuristics;
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by brian ridley, and Mike Lazer-Walker.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.310ts3.6
0.0.310ts3.7
0.0.310ts3.8
0.0.310ts3.9
0.0.310ts4.0
0.0.310ts4.1
0.0.310ts4.2
0.0.310ts4.3
0.0.310ts4.4
0.0.300ts2.0
0.0.300ts2.1
0.0.300ts2.2
0.0.300ts2.3
0.0.300ts2.4
0.0.300ts2.5
0.0.300ts2.6
0.0.300ts2.7
0.0.300ts2.8
0.0.300ts2.9
0.0.300ts3.0
0.0.300ts3.1
0.0.300ts3.2
0.0.300ts3.3
0.0.300ts3.4
0.0.300ts3.5
0.0.357ts5.8
0.0.357ts5.7
0.0.357latest
0.0.357ts4.5
0.0.357ts4.6
0.0.357ts4.7
0.0.357ts4.8
0.0.357ts4.9
0.0.357ts5.0
0.0.357ts5.1
0.0.357ts5.2
0.0.357ts5.3
0.0.357ts5.4
0.0.357ts5.5
0.0.357ts5.6
0.0.357ts5.9

Version History

VersionDownloads (Last 7 Days)Published
0.0.357
0.0.340
0.0.330
0.0.320
0.0.310
0.0.300
0.0.290
0.0.280
0.0.270
0.0.26-alpha0
0.0.25-alpha0
0.0.24-alpha0
0.0.23-alpha0
0.0.22-alpha0
0.0.21-alpha0
0.0.20-alpha0
0.0.15-alpha0
0.0.14-alpha0

Package Sidebar

Install

npm i @types/javascript-astar

Weekly Downloads

7

Version

0.0.35

License

MIT

Unpacked Size

4.18 kB

Total Files

5

Last publish

Collaborators

  • types