Workaround typescript issue with list responses being any.

master
Tom Hacohen 4 years ago
parent f36f8b3d18
commit dc98cd6010

@ -46,9 +46,8 @@ export default function CollectionMembers(props: PropsType) {
let iterator: string | null = null;
let done = false;
while (!done) {
// FIXME: shouldn't be any
const members: any = await memberManager.list({ iterator, limit: 30 });
iterator = members.iterator;
const members = await memberManager.list({ iterator, limit: 30 });
iterator = members.iterator as string;
done = members.done;
for (const member of members.data) {

@ -26,9 +26,8 @@ async function loadInvitations(etebase: Etebase.Account) {
let iterator: string | null = null;
let done = false;
while (!done) {
// FIXME: shouldn't be any
const invitations: any = await invitationManager.listIncoming({ iterator, limit: 30 });
iterator = invitations.iterator;
const invitations = await invitationManager.listIncoming({ iterator, limit: 30 });
iterator = invitations.iterator as string;
done = invitations.done;
ret.push(...invitations.data);

@ -31,9 +31,8 @@ async function loadRevisions(etebase: Etebase.Account, col: Etebase.Collection,
let iterator: string | null = null;
let done = false;
while (!done) {
// FIXME: shouldn't be any
const revisions: any = await itemManager.itemRevisions(item, { iterator, limit: 30 });
iterator = revisions.iterator;
const revisions = await itemManager.itemRevisions(item, { iterator, limit: 30 });
iterator = revisions.iterator as string;
done = revisions.done;
for (const item of revisions.data) {

Loading…
Cancel
Save