export function addContact(contact: Contact): Promise<void>;
however the following example returns the created contact when the promise resolves
const newPerson:Contact = {
givenNames: 'Foo'
...
}
Contacts.addContact(newPerson).then((contact) => {
console.log('contact', contact); // Logs the new record that was created
});
so my understanding is that the type definition should be
export function addContact(contact: Contact): Promise<Contact>;
(see getContactById definition for what I think is a correct example)
Current
addContact
definition ishowever the following example returns the created contact when the promise resolves
so my understanding is that the type definition should be
(see getContactById definition for what I think is a correct example)