elections-types 1.0.22 → 1.0.24
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.
|
@@ -5,7 +5,7 @@ export declare class Committee {
|
|
|
5
5
|
readonly committee_id: string;
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly url?: string;
|
|
8
|
-
readonly designation
|
|
8
|
+
readonly designation?: CommitteeDesignation;
|
|
9
9
|
readonly file_number?: number;
|
|
10
10
|
readonly principal_committee_ids?: string[];
|
|
11
11
|
readonly authorized_committee_ids?: string[];
|
|
@@ -37,10 +37,10 @@ export class Committee {
|
|
|
37
37
|
static is(committee) {
|
|
38
38
|
return (committee !== undefined &&
|
|
39
39
|
typeof committee.committee_id === "string" &&
|
|
40
|
-
|
|
40
|
+
typeof committee.name === "string" &&
|
|
41
41
|
(committee.url === undefined || typeof committee.url === "string") &&
|
|
42
|
-
is_committee_designation(committee.designation) &&
|
|
43
|
-
typeof committee.file_number === "number" && !isNaN(committee.file_number) &&
|
|
42
|
+
(committee.designation === undefined || is_committee_designation(committee.designation)) &&
|
|
43
|
+
(committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
|
|
44
44
|
(committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
|
45
45
|
(committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
|
46
46
|
(committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
package/package.json
CHANGED
package/src/types/Committee.ts
CHANGED
|
@@ -10,7 +10,7 @@ export class Committee {
|
|
|
10
10
|
readonly committee_id : string
|
|
11
11
|
readonly name : string
|
|
12
12
|
readonly url? : string
|
|
13
|
-
readonly designation : CommitteeDesignation
|
|
13
|
+
readonly designation? : CommitteeDesignation
|
|
14
14
|
readonly file_number? : number
|
|
15
15
|
readonly principal_committee_ids? : string[]
|
|
16
16
|
readonly authorized_committee_ids? : string[]
|
|
@@ -45,10 +45,10 @@ export class Committee {
|
|
|
45
45
|
return (
|
|
46
46
|
committee !== undefined &&
|
|
47
47
|
typeof committee.committee_id === "string" &&
|
|
48
|
-
|
|
48
|
+
typeof committee.name === "string" &&
|
|
49
49
|
(committee.url === undefined || typeof committee.url === "string") &&
|
|
50
|
-
is_committee_designation(committee.designation) &&
|
|
51
|
-
typeof committee.file_number === "number" && !isNaN(committee.file_number) &&
|
|
50
|
+
(committee.designation === undefined || is_committee_designation(committee.designation)) &&
|
|
51
|
+
(committee.file_number === undefined || typeof committee.file_number === "number" && !isNaN(committee.file_number)) &&
|
|
52
52
|
(committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|
|
53
53
|
(committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|
|
54
54
|
(committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|