import type { ComponentQuery } from './query.js'; /** * An iterator for yielding entity ids and their associated component data * @category Iterators * @example * // construct an instance * const iterator = new ComponentIterator(new ComponentQuery(entityMap, Player, Position)) * * // iterate component data that is related to the Player * for(const [entityId, player, position] of iterator) { } * * // you can also reset the iterator back to the start * // without having to create a new ComponentIterator instance * iterator.reset() * for(const [entityId, player, position] of iterator) { } */ export declare class ComponentIterator { private keyMap; private componentMaps; private entries; /** * Creates a new component iterator * @param query - The {@link ComponentQuery} to iterate over */ constructor(query: ComponentQuery); /** * Gets the next iterator value * @returns An {@link IteratorResult} containing the next [entityId, keyComponentData, ...relatedComponentData] tuple */ next(): IteratorResult<[number, TKey, ...TRelated]>; /** * Resets the iterator back to the first entry */ reset(): void; /** * Returns this iterator instance */ [Symbol.iterator](): this; } //# sourceMappingURL=iterator.d.ts.map