elections-types 1.0.44 → 1.0.45
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.
|
@@ -26,6 +26,7 @@ export class Candidate {
|
|
|
26
26
|
fec_name;
|
|
27
27
|
office_id;
|
|
28
28
|
state_id;
|
|
29
|
+
district;
|
|
29
30
|
election_id;
|
|
30
31
|
party_id;
|
|
31
32
|
active;
|
|
@@ -48,6 +49,7 @@ export class Candidate {
|
|
|
48
49
|
this.fec_name = candidate.fec_name;
|
|
49
50
|
this.office_id = candidate.office_id;
|
|
50
51
|
this.state_id = candidate.state_id;
|
|
52
|
+
this.district = candidate.district;
|
|
51
53
|
this.election_id = candidate.election_id;
|
|
52
54
|
this.party_id = candidate.party_id;
|
|
53
55
|
this.active = candidate.active;
|
|
@@ -69,6 +71,7 @@ export class Candidate {
|
|
|
69
71
|
typeof candidate.fec_name === "string" &&
|
|
70
72
|
is_office_id(candidate.office_id) &&
|
|
71
73
|
is_state_id(candidate.state_id) &&
|
|
74
|
+
typeof candidate.district === "number" &&
|
|
72
75
|
is_election_id(candidate.election_id) &&
|
|
73
76
|
(candidate.party_id === undefined || typeof candidate.party_id === "string") &&
|
|
74
77
|
(candidate.active === undefined || typeof candidate.active === "boolean") &&
|
package/package.json
CHANGED
package/src/types/Candidate.ts
CHANGED
|
@@ -32,6 +32,7 @@ export class Candidate {
|
|
|
32
32
|
readonly fec_name : string
|
|
33
33
|
readonly office_id : OfficeID
|
|
34
34
|
readonly state_id : StateID
|
|
35
|
+
readonly district? : number
|
|
35
36
|
readonly election_id : ElectionID
|
|
36
37
|
readonly party_id? : string
|
|
37
38
|
readonly active? : boolean
|
|
@@ -59,6 +60,7 @@ export class Candidate {
|
|
|
59
60
|
this.fec_name = candidate.fec_name
|
|
60
61
|
this.office_id = candidate.office_id
|
|
61
62
|
this.state_id = candidate.state_id
|
|
63
|
+
this.district = candidate.district
|
|
62
64
|
this.election_id = candidate.election_id
|
|
63
65
|
this.party_id = candidate.party_id
|
|
64
66
|
this.active = candidate.active
|
|
@@ -82,6 +84,7 @@ export class Candidate {
|
|
|
82
84
|
typeof candidate.fec_name === "string" &&
|
|
83
85
|
is_office_id(candidate.office_id) &&
|
|
84
86
|
is_state_id(candidate.state_id) &&
|
|
87
|
+
typeof candidate.district === "number" &&
|
|
85
88
|
is_election_id(candidate.election_id) &&
|
|
86
89
|
(candidate.party_id === undefined || typeof candidate.party_id === "string") &&
|
|
87
90
|
(candidate.active === undefined || typeof candidate.active === "boolean") &&
|