• Like Room.find with CachedObject

    Type Parameters

    • K extends FindCacheableConstant

    • C extends Partial<V> & {
          id: Id<V>;
          pos: RoomPosition;
          room?: undefined;
      } & OpaqueTag<"CachedObject", C>

    • V extends StructureSpawn | StructureController | Creep | PowerCreep | StructureLink | StructureExtension | StructureRampart | StructureRoad | StructureWall | StructureStorage | StructureTower | StructureObserver | StructurePowerSpawn | StructureExtractor | StructureLab | StructureTerminal | StructureContainer | StructureNuker | StructureFactory | StructureKeeperLair | StructurePowerBank | StructurePortal | StructureInvaderCore | Source | Resource<ResourceConstant> | ConstructionSite<BuildableStructureConstant> | Mineral<MineralConstant> | Nuke | Tombstone | Deposit | Ruin = FindTypes[K]

    Parameters

    • type: K

      kind of find query

    • defaultOpts: CacheOpts<C> & Partial<FilterOptions<K, V>> & PartialIfExtends<{
          map: ((v) => Untag<C>);
      }, CachedObject<V>, C>

      optional parameters

    Returns ((name, opts?) => readonly C[])

    an array of CachedObject

      • (name, opts?): readonly C[]
      • Parameters

        • name: RoomName
        • Optional opts: CacheOpts<C>

        Returns readonly C[]

Generated using TypeDoc