user 6 éve
szülő
commit
3720136147
2 módosított fájl, 4 hozzáadás és 4 törlés
  1. 2 2
      lib/contact-book.d.ts
  2. 2 2
      src/contact-book.ts

+ 2 - 2
lib/contact-book.d.ts

@@ -2,8 +2,8 @@ import { ContactItem } from "./contact-item";
 export declare class ContactBook {
     readonly items: ContactItem[];
     constructor(items: ContactItem[]);
-    getPrimaryEmailAddress(): string;
-    getPrimaryPhoneNumber(): string;
+    getPrimaryEmailAddress(): string | undefined;
+    getPrimaryPhoneNumber(): string | undefined;
     getFromPhoneNumbers(): string[];
     getFromEmailAddresses(): string[];
     lookupByAddress(addressType: string, addressValue: string): ContactItem | undefined;

+ 2 - 2
src/contact-book.ts

@@ -9,11 +9,11 @@ export class ContactBook {
     this.items = items;
   }
 
-  public getPrimaryEmailAddress() {
+  public getPrimaryEmailAddress(): string | undefined {
     return this.getFromEmailAddresses()[0];
   }
 
-  public getPrimaryPhoneNumber() {
+  public getPrimaryPhoneNumber(): string | undefined {
     return this.getFromPhoneNumbers()[0];
   }