@@ -926,7 +926,7 @@ interface FindPathOpts {
926
926
ignoreCreeps ?: boolean ;
927
927
ignoreDestructibleStructures ?: boolean ;
928
928
ignoreRoads ?: boolean ;
929
- ignore ?: [ any | RoomPosition ] ;
929
+ ignore ?: any [ ] | RoomPosition [ ] ;
930
930
avoid ?: any [ ] | RoomPosition [ ] ;
931
931
maxOps ?: number ;
932
932
heuristicWeight ?: number ;
@@ -992,10 +992,10 @@ declare class GameMap {
992
992
* @param toRoom Finish room name or room object.
993
993
* @returns the route array or ERR_NO_PATH code
994
994
*/
995
- findRoute ( fromRoom : string | Room , toRoom : string | Room ) : [ {
995
+ findRoute ( fromRoom : string | Room , toRoom : string | Room ) : {
996
996
exit : string ;
997
997
room : string ;
998
- } ] | number ;
998
+ } [ ] | number ;
999
999
/**
1000
1000
* Get the linear distance (in rooms) between two rooms. You can use this function to estimate the energy cost of
1001
1001
* sending resources through terminals, or using observers and nukes.
@@ -1277,7 +1277,7 @@ declare class RoomPosition {
1277
1277
* @param objects An array of room's objects or RoomPosition objects that the search should be executed against.
1278
1278
* @param opts An object containing pathfinding options (see Room.findPath), or one of the following: filter, algorithm
1279
1279
*/
1280
- findClosestByPath < T > ( objects : [ T | RoomPosition ] , opts ?: {
1280
+ findClosestByPath < T > ( objects : T [ ] | RoomPosition [ ] , opts ?: {
1281
1281
filter ?: any | string ;
1282
1282
algorithm ?: string ;
1283
1283
} ) : T ;
@@ -1294,7 +1294,7 @@ declare class RoomPosition {
1294
1294
* @param objects An array of room's objects or RoomPosition objects that the search should be executed against.
1295
1295
* @param opts An object containing one of the following options: filter
1296
1296
*/
1297
- findClosestByRange < T > ( objects : [ T | RoomPosition ] , opts ?: {
1297
+ findClosestByRange < T > ( objects : T [ ] | RoomPosition [ ] , opts ?: {
1298
1298
filter : any | string ;
1299
1299
} ) : T ;
1300
1300
/**
@@ -1313,7 +1313,7 @@ declare class RoomPosition {
1313
1313
* @param range The range distance.
1314
1314
* @param opts See Room.find.
1315
1315
*/
1316
- findInRange < T > ( objects : [ T | RoomPosition ] , range : number , opts ?: {
1316
+ findInRange < T > ( objects : T [ ] | RoomPosition [ ] , range : number , opts ?: {
1317
1317
filter ?: any | string ;
1318
1318
algorithm ?: string ;
1319
1319
} ) : T [ ] ;
0 commit comments