You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the question marks (?) to the opts object. This was causing my code to throw errors since I was only using filter and not specifying the algorithm (using the default).
/**
* Find an object with the shortest path from the given position. Uses A* search algorithm and Dijkstra's algorithm.
* @param type See Room.find
* @param opts An object containing pathfinding options (see Room.findPath), or one of the following: filter, algorithm
*/
findClosestByPath<T>(type: number, opts?: {
filter?: any | string;
algorithm?: string;
}): T;
/**
* Find an object with the shortest path from the given position. Uses A* search algorithm and Dijkstra's algorithm.
* @param objects An array of room's objects or RoomPosition objects that the search should be executed against.
* @param opts An object containing pathfinding options (see Room.findPath), or one of the following: filter, algorithm
*/
findClosestByPath<T>(objects: [T | RoomPosition], opts?: {
filter?: any | string;
algorithm?: string;
}): T;
The text was updated successfully, but these errors were encountered:
I added the question marks (?) to the opts object. This was causing my code to throw errors since I was only using filter and not specifying the algorithm (using the default).
The text was updated successfully, but these errors were encountered: