Permalink
Browse files

update index.d.ts for path canelling changes.

  • Loading branch information...
sbj42 committed Mar 27, 2017
1 parent 13e7dcb commit e2f86d4692c1eaef03e9bde6d34e907775517df2
Showing with 11 additions and 1 deletion.
  1. +11 −1 index.d.ts
View
@@ -131,9 +131,19 @@ export class js {
* @param {Number} endY The Y position of the ending point.
* @param {Function} callback A function that is called when your path
* is found, or no path is found.
* @return {Number} A numeric, non-zero value which identifies the created instance. This value can be passed to cancelPath to cancel the path calculation.
*
*/
findPath(startX: number, startY: number, endX: number, endY: number, callback: (path: { x: number, y: number }[]) => void): void
findPath(startX: number, startY: number, endX: number, endY: number, callback: (path: { x: number, y: number }[]) => void): number
/**
* Cancel a path calculation.
*
* @param {Number} instanceId The instance ID of the path being calculated
* @return {Boolean} True if an instance was found and cancelled.
*
**/
cancelPath(instanceId: number): boolean
/**
* This method steps through the A* Algorithm in an attempt to

0 comments on commit e2f86d4

Please sign in to comment.