Код: Выделить всё
const plans = client.listPlans({
params: { limit: 200 },
});
for await (const plan of plans.each()) {
planList.push(plan);
}
< /code>
У меня есть код, который выглядит так, тип возврата ListPlans - это класс, который выглядит как < /p>
export declare class Pager {
count(): Promise;
first(): Promise;
each(): AsyncIterable;
eachPage(): AsyncIterable;
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... nciterable
Мобильная версия