ix
Version:
The Interactive Extensions for JavaScript
29 lines (27 loc) • 813 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OfIterable = exports.of = void 0;
const iterablex_js_1 = require("./iterablex.js");
/**
* Creates an iterable from the specified elements.
*
* @template TSource The type of the elements to create an iterable sequence.
* @param {...TSource[]} args The elements to turn into an iterable sequence.
* @returns {IterableX<TSource>} The iterable sequence created from the elements.
*/
function of(...args) {
return new OfIterable(args);
}
exports.of = of;
/** @ignore */
class OfIterable extends iterablex_js_1.IterableX {
constructor(args) {
super();
this._args = args;
}
*[Symbol.iterator]() {
yield* this._args;
}
}
exports.OfIterable = OfIterable;
//# sourceMappingURL=of.js.map