forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
easystarjs.d.ts
executable file
·34 lines (30 loc) · 1.06 KB
/
easystarjs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Type definitions for EasyStar.js 0.1.6
// Project: http://easystarjs.com/
// Definitions by: Magnus Gustafsson <https://github.com/borundin>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/*
easystarjs.d.ts may be freely distributed under the MIT license.
*/
declare module "easystarjs"
{
class js
{
new (): js;
setGrid(grid: number[][]): void;
setAcceptableTiles(tiles: number[]): void;
findPath(startX: number, startY: number, endX: number, endY: number, callback: (path: Position[]) => void): void;
calculate(): void;
setIterationsPerCalculation(iterations: number): void;
avoidAdditionalPoint(x: number, y: number): void;
stopAvoidingAdditionalPoint(x: number, y: number): void;
stopAvoidingAllAdditionalPoints(): void;
enableDiagonals(): void;
disableDiagonals(): void;
setTileCost(tileType: number, multiplicativeCost: number): void;
}
interface Position
{
x: number;
y: number;
}
}