triangle-types 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,6 +22,14 @@ export declare class Voter {
|
|
|
22
22
|
readonly address_mail_city: string;
|
|
23
23
|
readonly address_mail_state_id: string;
|
|
24
24
|
readonly address_mail_zip: string;
|
|
25
|
+
readonly occupation_group_id?: string;
|
|
26
|
+
readonly occupation_description?: string;
|
|
27
|
+
readonly phone_home?: string;
|
|
28
|
+
readonly phone_mobile?: string;
|
|
29
|
+
readonly ethnic_group_id?: string;
|
|
30
|
+
readonly ethnic_description?: string;
|
|
31
|
+
readonly religion_description?: string;
|
|
32
|
+
readonly party_description?: string;
|
|
25
33
|
readonly [x: string]: any;
|
|
26
34
|
constructor(voter: any);
|
|
27
35
|
static is(voter: any): voter is Voter;
|
|
@@ -22,6 +22,14 @@ export class Voter {
|
|
|
22
22
|
address_mail_city;
|
|
23
23
|
address_mail_state_id;
|
|
24
24
|
address_mail_zip;
|
|
25
|
+
occupation_group_id;
|
|
26
|
+
occupation_description;
|
|
27
|
+
phone_home;
|
|
28
|
+
phone_mobile;
|
|
29
|
+
ethnic_group_id;
|
|
30
|
+
ethnic_description;
|
|
31
|
+
religion_description;
|
|
32
|
+
party_description;
|
|
25
33
|
constructor(voter) {
|
|
26
34
|
if (!Voter.is(voter)) {
|
|
27
35
|
throw Error("Invalid input.");
|
|
@@ -48,6 +56,14 @@ export class Voter {
|
|
|
48
56
|
this.address_mail_city = voter.address_mail_city;
|
|
49
57
|
this.address_mail_state_id = voter.address_mail_state_id;
|
|
50
58
|
this.address_mail_zip = voter.address_mail_zip;
|
|
59
|
+
this.occupation_group_id = voter.occupation_group_id;
|
|
60
|
+
this.occupation_description = voter.occupation_description;
|
|
61
|
+
this.phone_home = voter.phone_home;
|
|
62
|
+
this.phone_mobile = voter.phone_mobile;
|
|
63
|
+
this.ethnic_group_id = voter.ethnic_group_id;
|
|
64
|
+
this.ethnic_description = voter.ethnic_description;
|
|
65
|
+
this.religion_description = voter.religion_description;
|
|
66
|
+
this.party_description = voter.party_description;
|
|
51
67
|
}
|
|
52
68
|
static is(voter) {
|
|
53
69
|
return (voter !== undefined &&
|
|
@@ -72,7 +88,15 @@ export class Voter {
|
|
|
72
88
|
(voter.address_mail_2 === undefined || typeof voter.address_mail_2 === "string") &&
|
|
73
89
|
typeof voter.address_mail_city === "string" &&
|
|
74
90
|
typeof voter.address_mail_state_id === "string" &&
|
|
75
|
-
typeof voter.address_mail_zip === "string"
|
|
91
|
+
typeof voter.address_mail_zip === "string" &&
|
|
92
|
+
(voter.occupation_group_id === undefined || typeof voter.occupation_group_id === "string") &&
|
|
93
|
+
(voter.occupation_description === undefined || typeof voter.occupation_description === "string") &&
|
|
94
|
+
(voter.phone_home === undefined || typeof voter.phone_home === "string") &&
|
|
95
|
+
(voter.phone_mobile === undefined || typeof voter.phone_mobile === "string") &&
|
|
96
|
+
(voter.ethnic_group_id === undefined || typeof voter.ethnic_group_id === "string") &&
|
|
97
|
+
(voter.ethnic_description === undefined || typeof voter.ethnic_description === "string") &&
|
|
98
|
+
(voter.religion_description === undefined || typeof voter.religion_description === "string") &&
|
|
99
|
+
(voter.party_description === undefined || typeof voter.party_description === "string"));
|
|
76
100
|
}
|
|
77
101
|
}
|
|
78
102
|
export class VoterAux extends Voter {
|
package/package.json
CHANGED
|
@@ -23,6 +23,14 @@ export class Voter {
|
|
|
23
23
|
readonly address_mail_city : string
|
|
24
24
|
readonly address_mail_state_id : string
|
|
25
25
|
readonly address_mail_zip : string
|
|
26
|
+
readonly occupation_group_id? : string
|
|
27
|
+
readonly occupation_description? : string
|
|
28
|
+
readonly phone_home? : string
|
|
29
|
+
readonly phone_mobile? : string
|
|
30
|
+
readonly ethnic_group_id? : string
|
|
31
|
+
readonly ethnic_description? : string
|
|
32
|
+
readonly religion_description? : string
|
|
33
|
+
readonly party_description? : string
|
|
26
34
|
readonly [x : string] : any
|
|
27
35
|
|
|
28
36
|
constructor(voter : any) {
|
|
@@ -51,6 +59,14 @@ export class Voter {
|
|
|
51
59
|
this.address_mail_city = voter.address_mail_city
|
|
52
60
|
this.address_mail_state_id = voter.address_mail_state_id
|
|
53
61
|
this.address_mail_zip = voter.address_mail_zip
|
|
62
|
+
this.occupation_group_id = voter.occupation_group_id
|
|
63
|
+
this.occupation_description = voter.occupation_description
|
|
64
|
+
this.phone_home = voter.phone_home
|
|
65
|
+
this.phone_mobile = voter.phone_mobile
|
|
66
|
+
this.ethnic_group_id = voter.ethnic_group_id
|
|
67
|
+
this.ethnic_description = voter.ethnic_description
|
|
68
|
+
this.religion_description = voter.religion_description
|
|
69
|
+
this.party_description = voter.party_description
|
|
54
70
|
}
|
|
55
71
|
|
|
56
72
|
static is(voter : any) : voter is Voter {
|
|
@@ -77,7 +93,15 @@ export class Voter {
|
|
|
77
93
|
(voter.address_mail_2 === undefined || typeof voter.address_mail_2 === "string") &&
|
|
78
94
|
typeof voter.address_mail_city === "string" &&
|
|
79
95
|
typeof voter.address_mail_state_id === "string" &&
|
|
80
|
-
typeof voter.address_mail_zip === "string"
|
|
96
|
+
typeof voter.address_mail_zip === "string" &&
|
|
97
|
+
(voter.occupation_group_id === undefined || typeof voter.occupation_group_id === "string") &&
|
|
98
|
+
(voter.occupation_description === undefined || typeof voter.occupation_description === "string") &&
|
|
99
|
+
(voter.phone_home === undefined || typeof voter.phone_home === "string") &&
|
|
100
|
+
(voter.phone_mobile === undefined || typeof voter.phone_mobile === "string") &&
|
|
101
|
+
(voter.ethnic_group_id === undefined || typeof voter.ethnic_group_id === "string") &&
|
|
102
|
+
(voter.ethnic_description === undefined || typeof voter.ethnic_description === "string") &&
|
|
103
|
+
(voter.religion_description === undefined || typeof voter.religion_description === "string") &&
|
|
104
|
+
(voter.party_description === undefined || typeof voter.party_description === "string")
|
|
81
105
|
)
|
|
82
106
|
}
|
|
83
107
|
}
|