ErrorArgument of type '{ [x: string]: any; }' is not assignable to parameter of type 'Contact'.Type '{ [x: string]: any; }' is missing the following properties from type 'Contact': id, contactType, name ts(2345)
const contact: { [x: string]: any;}
I have a problem with this error. I'm trying to download a contact in my expo app.
My Code download.tsx
:
const downloadContact = async (customer: any) => { if(hasContactPermission) { const contact = { [Contacts.Fields.Name]: customer.name, [Contacts.Fields.Emails]: customer.email, [Contacts.Fields.PhoneNumbers]: customer.phone, }; const contactId = await Contacts.addContactAsync(contact); }}