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 iterator: string | null = null;
let done = false; let done = false;
while (!done) { while (!done) {
// FIXME: shouldn't be any const members = await memberManager.list({ iterator, limit: 30 });
const members: any = await memberManager.list({ iterator, limit: 30 }); iterator = members.iterator as string;
iterator = members.iterator;
done = members.done; done = members.done;
for (const member of members.data) { for (const member of members.data) {

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

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

Loading…
Cancel
Save