Repositorio del curso CCOM4030 el semestre B91 del proyecto kilometro0

ContactsPhoneNumbers.d.ts 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. interface Navigator {
  2. /** Provides access to the device contacts database. */
  3. contactsPhoneNumbers: ContactsPhoneNumbers;
  4. }
  5. interface ContactsPhoneNumbers {
  6. /**
  7. * The navigator.contactsPhoneNumbers.list method executes asynchronously, querying the device contacts database
  8. * and returning an array of Contact objects. The resulting objects are passed to the onSuccess
  9. * callback function specified by the onSuccess parameter.
  10. * @param onSuccess Success callback function invoked with the array of Contact objects returned from the database
  11. * @param onError Error callback function, invoked when an error occurs.
  12. */
  13. list(onSuccess: (contacts: Contact[]) => void,
  14. onError?: (error: string) => void): void;
  15. }
  16. interface Contact {
  17. /** A globally unique identifier. */
  18. id?: string;
  19. /** The first name of this Contact. */
  20. firstName?: string;
  21. /** The last name of this Contact. */
  22. lastName?: string;
  23. /** The name of this Contact, suitable for display to end users. */
  24. displayName?: string;
  25. /** An array of all the contact's phone numbers. */
  26. phoneNumbers?: ContactPhoneNumber[];
  27. }
  28. declare var Contact: {
  29. /** Constructor of Contact object */
  30. new(id?: string,
  31. firstName?: string,
  32. LastName?: string,
  33. displayName?: string,
  34. phoneNumbers?: ContactPhoneNumber[]): Contact
  35. };
  36. /** Contains different kinds of information about a Contact object's phone number. */
  37. interface ContactPhoneNumber {
  38. /** The contact phone number's number. */
  39. number?: string;
  40. /** The contact phone number's normalized number. */
  41. normalizedNumber?: string;
  42. /** The contact phone number's type (WORK, MOBILE, HOME or OTHER). */
  43. type?: string;
  44. }
  45. declare var ContactPhoneNumber: {
  46. /** Constructor for ContactPhoneNumber object */
  47. new (number?: string,
  48. normalizedNumber?: string,
  49. type?: string): ContactPhoneNumber
  50. };