Update model interfaces to require all attributes

master
Kevin C. Coram 2019-09-07 21:32:50 -04:00
parent 4c014600c5
commit c17d79d16c
Signed by: kevin
GPG Key ID: 0342351B3D61AD35
2 changed files with 14 additions and 12 deletions

View File

@ -1,20 +1,20 @@
export interface Name {
firstName?: string;
lastName?: string;
middleName?: string;
prefix?: string;
suffix?: string;
firstName: string;
lastName: string;
middleName: string;
prefix: string;
suffix: string;
}
export interface Address {
line_1?: string;
line_2?: string;
city?: string;
state?: string;
postalCode?: string;
line_1: string;
line_2: string;
city: string;
state: string;
postalCode: string;
}
export interface Contact {
name?: Name;
addresses?: Address[];
name: Name;
addresses: Address[];
}

View File

@ -14,12 +14,14 @@ const contact: Contact = {
addresses: [
{
line_1: '123 Main Street',
line_2: null,
city: 'New York',
state: 'NY',
postalCode: '12345',
},
{
line_1: '123 South Street',
line_2: null,
city: 'Boston',
state: 'MA',
postalCode: '54321',