triangle-types 1.0.142 → 1.0.144
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.
|
@@ -11,7 +11,7 @@ export declare class Prism {
|
|
|
11
11
|
readonly state_legislature_senate_district_id?: string;
|
|
12
12
|
readonly county_id?: string;
|
|
13
13
|
readonly school_district_id?: string;
|
|
14
|
-
readonly
|
|
14
|
+
readonly party_type_ids: VoterPartyTypeID[];
|
|
15
15
|
readonly [x: string]: any;
|
|
16
16
|
constructor(prism: any);
|
|
17
17
|
static is(prism: any): prism is Prism;
|
|
@@ -11,7 +11,7 @@ export class Prism {
|
|
|
11
11
|
state_legislature_senate_district_id;
|
|
12
12
|
county_id;
|
|
13
13
|
school_district_id;
|
|
14
|
-
|
|
14
|
+
party_type_ids;
|
|
15
15
|
constructor(prism) {
|
|
16
16
|
if (!Prism.is(prism)) {
|
|
17
17
|
throw Error("Invalid input.");
|
|
@@ -24,7 +24,7 @@ export class Prism {
|
|
|
24
24
|
this.state_legislature_senate_district_id = prism.state_legislature_senate_district_id;
|
|
25
25
|
this.county_id = prism.county_id;
|
|
26
26
|
this.school_district_id = prism.school_district_id;
|
|
27
|
-
this.
|
|
27
|
+
this.party_type_ids = prism.party_type_ids;
|
|
28
28
|
}
|
|
29
29
|
static is(prism) {
|
|
30
30
|
return (prism !== undefined &&
|
|
@@ -36,7 +36,7 @@ export class Prism {
|
|
|
36
36
|
(prism.state_legislature_senate_district_id === undefined || typeof prism.state_legislature_senate_district_id === "string") &&
|
|
37
37
|
(prism.county_id === undefined || typeof prism.county_id === "string") &&
|
|
38
38
|
(prism.school_district_id === undefined || typeof prism.school_district_id === "string") &&
|
|
39
|
-
(prism.
|
|
39
|
+
Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export class PrismAux extends Prism {
|
package/package.json
CHANGED
package/src/types/prism/Prism.ts
CHANGED
|
@@ -12,7 +12,7 @@ export class Prism {
|
|
|
12
12
|
readonly state_legislature_senate_district_id? : string
|
|
13
13
|
readonly county_id? : string
|
|
14
14
|
readonly school_district_id? : string
|
|
15
|
-
readonly
|
|
15
|
+
readonly party_type_ids : VoterPartyTypeID[]
|
|
16
16
|
readonly [x : string] : any
|
|
17
17
|
|
|
18
18
|
constructor(prism : any) {
|
|
@@ -27,7 +27,7 @@ export class Prism {
|
|
|
27
27
|
this.state_legislature_senate_district_id = prism.state_legislature_senate_district_id
|
|
28
28
|
this.county_id = prism.county_id
|
|
29
29
|
this.school_district_id = prism.school_district_id
|
|
30
|
-
this.
|
|
30
|
+
this.party_type_ids = prism.party_type_ids
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
static is(prism : any) : prism is Prism {
|
|
@@ -41,7 +41,7 @@ export class Prism {
|
|
|
41
41
|
(prism.state_legislature_senate_district_id === undefined || typeof prism.state_legislature_senate_district_id === "string") &&
|
|
42
42
|
(prism.county_id === undefined || typeof prism.county_id === "string") &&
|
|
43
43
|
(prism.school_district_id === undefined || typeof prism.school_district_id === "string") &&
|
|
44
|
-
(prism.
|
|
44
|
+
Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id)
|
|
45
45
|
)
|
|
46
46
|
}
|
|
47
47
|
}
|