// Type definitions for javascript-astar // Project: https://github.com/bgrins/javascript-astar // Definitions by: brian ridley , Mike Lazer-Walker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare class Graph { grid: Array>; constructor(grid: Array>, options?: {diagonal?: boolean}); } 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, heuristic?: Heuristic } ): Array; var heuristics: Heuristics; }