elections-types 1.0.17 → 1.0.19
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.
|
@@ -14,8 +14,8 @@ export declare class Candidate {
|
|
|
14
14
|
readonly state_id: StateID;
|
|
15
15
|
readonly election_id: ElectionID;
|
|
16
16
|
readonly party_id?: string;
|
|
17
|
-
readonly active
|
|
18
|
-
readonly status
|
|
17
|
+
readonly active?: boolean;
|
|
18
|
+
readonly status?: string;
|
|
19
19
|
readonly file_number?: number;
|
|
20
20
|
readonly committee_ids?: string[];
|
|
21
21
|
readonly principal_committee_ids?: string[];
|
|
@@ -69,10 +69,10 @@ export class Candidate {
|
|
|
69
69
|
is_state_id(candidate.state_id) &&
|
|
70
70
|
is_election_id(candidate.election_id) &&
|
|
71
71
|
(candidate.party_id === undefined || typeof candidate.party_id === "string") &&
|
|
72
|
-
typeof candidate.active === "boolean" &&
|
|
73
|
-
typeof candidate.status === "string" &&
|
|
72
|
+
(candidate.active === undefined || typeof candidate.active === "boolean") &&
|
|
73
|
+
(candidate.status === undefined || typeof candidate.status === "string") &&
|
|
74
74
|
(candidate.file_number === undefined || typeof candidate.file_number === "number") &&
|
|
75
|
-
(candidate.
|
|
75
|
+
(candidate.committee_ids === undefined || Array.isArray(candidate.committee_ids) && candidate.committee_ids.map((committee_id) => typeof committee_id === "string")) &&
|
|
76
76
|
(candidate.principal_committee_ids === undefined || Array.isArray(candidate.principal_committee_ids) && candidate.principal_committee_ids.map((committee_id) => typeof committee_id === "string")) &&
|
|
77
77
|
(candidate.authorized_committee_ids === undefined || Array.isArray(candidate.authorized_committee_ids) && candidate.authorized_committee_ids.map((committee_id) => typeof committee_id === "string")) &&
|
|
78
78
|
(candidate.sponsor_committee_ids === undefined || Array.isArray(candidate.sponsor_committee_ids) && candidate.sponsor_committee_ids.map((committee_id) => typeof committee_id === "string")) &&
|
package/package.json
CHANGED
package/src/types/Candidate.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class Candidate {
|
|
|
82
82
|
(candidate.active === undefined || typeof candidate.active === "boolean") &&
|
|
83
83
|
(candidate.status === undefined || typeof candidate.status === "string") &&
|
|
84
84
|
(candidate.file_number === undefined || typeof candidate.file_number === "number") &&
|
|
85
|
-
(candidate.
|
|
85
|
+
(candidate.committee_ids === undefined || Array.isArray(candidate.committee_ids) && candidate.committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
|
|
86
86
|
(candidate.principal_committee_ids === undefined || Array.isArray(candidate.principal_committee_ids) && candidate.principal_committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
|
|
87
87
|
(candidate.authorized_committee_ids === undefined || Array.isArray(candidate.authorized_committee_ids) && candidate.authorized_committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
|
|
88
88
|
(candidate.sponsor_committee_ids === undefined || Array.isArray(candidate.sponsor_committee_ids) && candidate.sponsor_committee_ids.map((committee_id : any) => typeof committee_id === "string")) &&
|