Skip to content

Commit 822cb2d

Browse files
authored
Merge pull request #468 from bertrandgressier/master
Add getCount in typescript
2 parents aa2949e + 50024de commit 822cb2d

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ Add kit specific "permission" keys to your Xcode `Info.plist` file, in order to
168168
* `getAll` (callback) - returns *all* contacts as an array of objects
169169
* `getAllWithoutPhotos` - same as `getAll` on Android, but on iOS it will not return uris for contact photos (because there's a significant overhead in creating the images)
170170
* `getContactById(contactId, callback)` - returns contact with defined contactId (or null if it doesn't exist)
171+
* `getCount(callback)` - returns the number of contacts
171172
* `getPhotoForId(contactId, callback)` - returns a URI (or null) for a contacts photo
172173
* `addContact` (contact, callback) - adds a contact to the AddressBook.
173174
* `openContactForm` (contact, callback) - create a new contact and display in contactsUI.

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export function getAll(callback: (error: any, contacts: Contact[]) => void): void;
22
export function getAllWithoutPhotos(callback: (error: any, contacts: Contact[]) => void): void;
33
export function getContactById(contactId: string, callback: (error: any, contact: Contact) => void): void;
4+
export function getCount(callback: (count: number) => void): void;
45
export function getPhotoForId(contactId: string, callback: (error: any, photoUri: string) => void): void;
56
export function addContact(contact: Contact, callback: (error?: any) => void): void;
67
export function openContactForm(contact: Contact, callback: (error: any, contact: Contact) => void): void;

0 commit comments

Comments
 (0)