elections-types 1.0.43 → 1.0.44
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommitteeAux } from "./Committee.js";
|
|
2
2
|
import { ElectionID, OfficeID } from "./Election.js";
|
|
3
3
|
import { FECReport } from "./FECReport.js";
|
|
4
4
|
import { StateID } from "./State.js";
|
|
@@ -33,7 +33,7 @@ export declare class Candidate {
|
|
|
33
33
|
static is(candidate: any): candidate is Candidate;
|
|
34
34
|
}
|
|
35
35
|
export declare class CandidateAux extends Candidate {
|
|
36
|
-
readonly committees:
|
|
36
|
+
readonly committees: CommitteeAux[];
|
|
37
37
|
readonly fec_reports: FECReport[];
|
|
38
38
|
constructor(candidate: any);
|
|
39
39
|
static is(candidate: any): candidate is CandidateAux;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommitteeAux } from "./Committee.js";
|
|
2
2
|
import { is_election_id, is_office_id } from "./Election.js";
|
|
3
3
|
import { FECReport } from "./FECReport.js";
|
|
4
4
|
import { is_state_id } from "./State.js";
|
|
@@ -99,7 +99,7 @@ export class CandidateAux extends Candidate {
|
|
|
99
99
|
static is(candidate) {
|
|
100
100
|
return (Candidate.is(candidate) &&
|
|
101
101
|
Array.isArray(candidate.committees) &&
|
|
102
|
-
candidate.committees.every(
|
|
102
|
+
candidate.committees.every(CommitteeAux.is) &&
|
|
103
103
|
Array.isArray(candidate.fec_reports) &&
|
|
104
104
|
candidate.fec_reports.every(FECReport.is));
|
|
105
105
|
}
|
package/package.json
CHANGED
package/src/types/Candidate.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Committee } from "./Committee"
|
|
1
|
+
import { Committee, CommitteeAux } from "./Committee"
|
|
2
2
|
import { ElectionID, is_election_id, is_office_id, OfficeID } from "./Election"
|
|
3
3
|
import { FECReport } from "./FECReport"
|
|
4
4
|
import { is_state_id, StateID } from "./State"
|
|
@@ -101,7 +101,7 @@ export class Candidate {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export class CandidateAux extends Candidate {
|
|
104
|
-
readonly committees :
|
|
104
|
+
readonly committees : CommitteeAux[]
|
|
105
105
|
readonly fec_reports : FECReport[]
|
|
106
106
|
|
|
107
107
|
constructor(candidate : any) {
|
|
@@ -117,7 +117,7 @@ export class CandidateAux extends Candidate {
|
|
|
117
117
|
return (
|
|
118
118
|
Candidate.is(candidate) &&
|
|
119
119
|
Array.isArray(candidate.committees) &&
|
|
120
|
-
candidate.committees.every(
|
|
120
|
+
candidate.committees.every(CommitteeAux.is) &&
|
|
121
121
|
Array.isArray(candidate.fec_reports) &&
|
|
122
122
|
candidate.fec_reports.every(FECReport.is)
|
|
123
123
|
)
|