Files
SnowLuma/.pnpm-store/v11/files/ec/7d7ecc25570e9c83012d7e2dfc98f0642dd3ae5d7e67640c404f1cb087d3e9c223ccc257661bd83f79f521d3263d4b8d366896122ef927bf3d5ca91ce3e2ef
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

19 lines
455 B
Plaintext

export async function toArrayAsync(it) {
const arr = [];
for await (const o of it) {
arr.push(o);
}
return arr;
}
export async function takeResult(it) {
for await (const o of it) {
if (o.type === 'result') {
return o.result;
}
else if (o.type === 'error') {
throw o.error;
}
}
throw new Error('No result in stream.');
}
//# sourceMappingURL=responseMessage.js.map