interface GlobalControlLevel { level : number ; progress : number ; progressTotal : number ; } interface HeapStatistics { total_heap_size : number ; total_heap_size_executable : number ; total_physical_size : number ; total_available_size : number ; used_heap_size : number ; heap_size_limit : number ; malloced_memory : number ; peak_malloced_memory : number ; does_zap_garbage : 0 | 1 ; externally_allocated_size : number ; } interface CPU { limit : number ; tickLimit : number ; bucket : number ; /**
     * Get amount of CPU time used from the beginning of the current game tick. Always returns 0 in the Simulation mode.
     */ getUsed ( ) : number ; getHeapStatistics ( ) : HeapStatistics ; } /**
 * An array describing the creep’s body. Each element contains the following properties:
 */ interface BodyPartDefinition { /**
     * If the body part is boosted, this property specifies the mineral type which is used for boosting. One of the RESOURCE_* constants.
     */ boost : string ; /**
     * One of the body part types constants.
     */ type : string ; /**
     * The remaining amount of hit points of this body part.
     */ hits : number ; } interface Owner { username : string ; } interface ReservationDefinition { username : string ; ticksToEnd : number ; } interface SignDefinition { username : string ; text : string ; time : number ; datetime : Date ; } interface StoreDefinition { [ resource ] : number | undefined ; energy ? : number ; power ? : number ; } interface LookAtResultWithPos { x : number ; y : number ; type : string ; constructionSite ? : ConstructionSite ; creep ? : Creep ; terrain ? : string ; structure ? : Structure ; flag ? : Flag ; energy ? : Resource ; exit ? : any ; source ? : Source ; mineral ? : Mineral ; resource ? : Resource ; } interface LookAtResult { type : string ; constructionSite ? : ConstructionSite ; creep ? : Creep ; energy ? : Resource ; exit ? : any ; flag ? : Flag ; source ? : Source ; structure ? : Structure ; terrain ? : string ; mineral ? : Mineral ; resource ? : Resource ; } interface LookAtResultMatrix { [ coord ] : LookAtResultMatrix | LookAtResult [ ] ; } interface FindPathOpts { /**
     * Treat squares with creeps as walkable. Can be useful with too many moving creeps around or in some other cases. The default
     * value is false.
     */ ignoreCreeps ? : boolean ; /**
     * Treat squares with destructible structures (constructed walls, ramparts, spawns, extensions) as walkable. Use this flag when
     * you need to move through a territory blocked by hostile structures. If a creep with an ATTACK body part steps on such a square,
     * it automatically attacks the structure. The default value is false.
     */ ignoreDestructibleStructures ? : boolean ; /**
     * Ignore road structures. Enabling this option can speed up the search. The default value is false. This is only used when the
     * new PathFinder is enabled.
     */ ignoreRoads ? : boolean ; param roomName param costMatrix returns costCallback ? ( roomName , costMatrix ) : boolean | CostMatrix ; /**
     * An array of the room's objects or RoomPosition objects which should be treated as walkable tiles during the search. This option
     * cannot be used when the new PathFinder is enabled (use costCallback option instead).
     */ ignore ? : any [ ] | RoomPosition [ ] ; /**
     * An array of the room's objects or RoomPosition objects which should be treated as obstacles during the search. This option cannot
     * be used when the new PathFinder is enabled (use costCallback option instead).
     */ avoid ? : any [ ] | RoomPosition [ ] ; /**
     * The maximum limit of possible pathfinding operations. You can limit CPU time used for the search based on ratio 1 op ~ 0.001 CPU.
     * The default value is 2000.
     */ maxOps ? : number ; /**
     * Weight to apply to the heuristic in the A* formula F = G + weight * H. Use this option only if you understand the underlying
     * A* algorithm mechanics! The default value is 1.2.
     */ heuristicWeight ? : number ; /**
     * If true, the result path will be serialized using Room.serializePath. The default is false.
     */ serialize ? : boolean ; /**
     * The maximum allowed rooms to search. The default (and maximum) is 16. This is only used when the new PathFinder is enabled.
     */ maxRooms ? : number ; /**
     * Path to within (range) tiles of target tile. The default is to path to the tile that the target is on (0).
     */ range ? : number ; } interface MoveToOpts extends FindPathOpts { /**
     * This option enables reusing the path found along multiple game ticks. It allows to save CPU time, but can result in a slightly
     * slower creep reaction behavior. The path is stored into the creep's memory to the _move property. The reusePath value defines
     * the amount of ticks which the path should be reused for. The default value is 5. Increase the amount to save more CPU, decrease
     * to make the movement more consistent. Set to 0 if you want to disable path reusing.
     */ reusePath ? : number ; /**
     * If reusePath is enabled and this option is set to true, the path will be stored in memory in the short serialized form using
     * Room.serializePath. The default value is true.
     */ serializeMemory ? : boolean ; /**
     * If this option is set to true, moveTo method will return ERR_NOT_FOUND if there is no memorized path to reuse. This can
     * significantly save CPU time in some cases. The default value is false.
     */ noPathFinding ? : boolean ; /**
     * Draw a line along the creep’s path using RoomVisual.poly. You can provide either an empty object or custom style parameters.
     */ visualizePathStyle ? : PolyStyle ; } ; interface PathStep { x : number ; dx : number ; y : number ; dy : number ; direction : number ; } /**
 * An object with survival game info
 */ interface SurvivalGameInfo { /**
     * Current score.
     */ score : number ; /**
     * Time to the next wave of invaders.
     */ timeToWave : number ; /**
     * The number of the next wave.
     */ wave : number ; } interface _Constructor < T > { readonly prototype : T ; } interface _ConstructorById < T > extends _Constructor < T > { new ( id ) : T ; ( id ) : T ; }