@itwin/imodels-client-management
Version:
iModels API client wrapper for applications that manage iModels.
28 lines • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntityListIteratorImpl = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const types_1 = require("../../types");
const EntityPageListIterator_1 = require("./EntityPageListIterator");
class EntityListIteratorImpl {
_entityPages;
_entities;
constructor(pageQueryFunc) {
this._entityPages = new EntityPageListIterator_1.EntityPageListIterator(pageQueryFunc);
this._entities = (0, types_1.flatten)(this._entityPages);
}
[Symbol.asyncIterator]() {
return this;
}
async next() {
return this._entities.next();
}
byPage() {
return this._entityPages;
}
}
exports.EntityListIteratorImpl = EntityListIteratorImpl;
//# sourceMappingURL=EntityListIteratorImpl.js.map