ix
Version:
The Interactive Extensions for JavaScript
27 lines (25 loc) • 733 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.returnAsyncIterator = exports.returnIterator = void 0;
const tslib_1 = require("tslib");
/**
* @ignore
*/
function returnIterator(it) {
if (typeof (it === null || it === void 0 ? void 0 : it.return) === 'function') {
it.return();
}
}
exports.returnIterator = returnIterator;
/**
* @ignore
*/
function returnAsyncIterator(it) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (typeof (it === null || it === void 0 ? void 0 : it.return) === 'function') {
yield it.return();
}
});
}
exports.returnAsyncIterator = returnAsyncIterator;
//# sourceMappingURL=returniterator.js.map