UNPKG

ts-bakery

Version:

Baked dependency injection for Typescript.

33 lines 732 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class TsNodeSequence { constructor() { this.nodes = []; this.index = 0; } get length() { return this.nodes.length; } addFirst(node) { this.nodes.unshift(node); } addLast(node) { this.nodes.push(node); } getNodes() { return this.nodes; } hasNext() { return this.index < this.nodes.length; } getNext() { if (this.hasNext()) { const node = this.nodes[this.index]; this.index++; return node; } return null; } } exports.default = TsNodeSequence; //# sourceMappingURL=TsNodeSequence.js.map