Fix a few types: relax contact, Email->Phone

pull/1/head
Scott Nonnenberg 7 years ago
parent 80b069e9b6
commit 8f934251ae

@ -41,7 +41,7 @@ function getLabelForEmail(method: Email, i18n: Localizer): string {
} }
} }
function getLabelForPhone(method: Email, i18n: Localizer): string { function getLabelForPhone(method: Phone, i18n: Localizer): string {
switch (method.type) { switch (method.type) {
case ContactType.CUSTOM: case ContactType.CUSTOM:
return method.label || i18n('phone'); return method.label || i18n('phone');

@ -3,7 +3,7 @@ import Attachments from '../../app/attachments';
import { format as formatPhoneNumber } from '../types/PhoneNumber'; import { format as formatPhoneNumber } from '../types/PhoneNumber';
export interface Contact { export interface Contact {
name: Name; name?: Name;
number?: Array<Phone>; number?: Array<Phone>;
email?: Array<Email>; email?: Array<Email>;
address?: Array<PostalAddress>; address?: Array<PostalAddress>;

Loading…
Cancel
Save