decord/source/modules/app_database/util/Iterable.tsx

46 lines
1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5078
// Function ID: 5079
2026-07-29 08:29:29 +00:00
// Name: next
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: chain
2026-08-24 06:08:38 +00:00
// Module 5078 (next)
import set from "set" /* 2 */;
2026-07-29 08:29:29 +00:00
class Chained {
constructor(arg0) {
obj = Object.create(new.target.prototype);
obj.index = 0;
obj.items = global;
return obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
const prototype = Chained.prototype;
// ToPropertyKey (0xa4)
prototype[prototype] = function() {
return this;
};
prototype["next"] = function next() {
const self = this;
if (this.index < this.items.length) {
const iter2 = self.items[self.index].next();
while (iter2.done) {
self.index = self.index + 1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return iter2;
}
return { done: true, value: "a" };
};
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/app_database/util/Iterable.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const chain = function chain() {
const items = [...arguments];
2026-08-04 21:03:28 +00:00
if (typeof Chained !== "function") {
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
}
const obj = Object.create(Chained.prototype);
obj.index = 0;
obj.items = items;
return obj;
2026-07-20 16:05:17 +00:00
};