triangle-types 1.0.286 → 1.0.288
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.
|
@@ -7,6 +7,7 @@ export declare class Prism {
|
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly jurisdiction_type_id: JurisdictionTypeID;
|
|
9
9
|
readonly jurisdiction_id: string;
|
|
10
|
+
readonly sub_jurisdiction_type_ids: JurisdictionTypeID[];
|
|
10
11
|
readonly party_type_ids?: VoterPartyTypeID[];
|
|
11
12
|
readonly target_ids: string[];
|
|
12
13
|
readonly [x: string]: any;
|
|
@@ -7,6 +7,7 @@ export class Prism {
|
|
|
7
7
|
name;
|
|
8
8
|
jurisdiction_type_id;
|
|
9
9
|
jurisdiction_id;
|
|
10
|
+
sub_jurisdiction_type_ids;
|
|
10
11
|
party_type_ids;
|
|
11
12
|
target_ids;
|
|
12
13
|
constructor(prism) {
|
|
@@ -18,6 +19,7 @@ export class Prism {
|
|
|
18
19
|
this.name = prism.name;
|
|
19
20
|
this.jurisdiction_type_id = prism.jurisdiction_type_id;
|
|
20
21
|
this.jurisdiction_id = prism.jurisdiction_id;
|
|
22
|
+
this.sub_jurisdiction_type_ids = prism.sub_jurisdiction_type_ids;
|
|
21
23
|
this.party_type_ids = prism.party_type_ids;
|
|
22
24
|
this.target_ids = prism.target_ids;
|
|
23
25
|
}
|
|
@@ -28,6 +30,7 @@ export class Prism {
|
|
|
28
30
|
typeof prism.name === "string" &&
|
|
29
31
|
is_jurisdiction_type_id(prism.jurisdiction_type_id) &&
|
|
30
32
|
typeof prism.jurisdiction_id === "string" &&
|
|
33
|
+
Array.isArray(prism.sub_jurisdiction_type_ids) && prism.sub_jurisdiction_type_ids.every(is_jurisdiction_type_id) &&
|
|
31
34
|
(prism.party_type_ids === undefined || Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id)) &&
|
|
32
35
|
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id) => typeof target_id === "string"));
|
|
33
36
|
}
|
package/package.json
CHANGED
package/src/types/prism/Prism.ts
CHANGED
|
@@ -8,6 +8,7 @@ export class Prism {
|
|
|
8
8
|
readonly name : string
|
|
9
9
|
readonly jurisdiction_type_id : JurisdictionTypeID
|
|
10
10
|
readonly jurisdiction_id : string
|
|
11
|
+
readonly sub_jurisdiction_type_ids : JurisdictionTypeID[]
|
|
11
12
|
readonly party_type_ids? : VoterPartyTypeID[]
|
|
12
13
|
readonly target_ids : string[]
|
|
13
14
|
readonly [x : string] : any
|
|
@@ -21,6 +22,7 @@ export class Prism {
|
|
|
21
22
|
this.name = prism.name
|
|
22
23
|
this.jurisdiction_type_id = prism.jurisdiction_type_id
|
|
23
24
|
this.jurisdiction_id = prism.jurisdiction_id
|
|
25
|
+
this.sub_jurisdiction_type_ids = prism.sub_jurisdiction_type_ids
|
|
24
26
|
this.party_type_ids = prism.party_type_ids
|
|
25
27
|
this.target_ids = prism.target_ids
|
|
26
28
|
}
|
|
@@ -33,6 +35,7 @@ export class Prism {
|
|
|
33
35
|
typeof prism.name === "string" &&
|
|
34
36
|
is_jurisdiction_type_id(prism.jurisdiction_type_id) &&
|
|
35
37
|
typeof prism.jurisdiction_id === "string" &&
|
|
38
|
+
Array.isArray(prism.sub_jurisdiction_type_ids) && prism.sub_jurisdiction_type_ids.every(is_jurisdiction_type_id) &&
|
|
36
39
|
(prism.party_type_ids === undefined || Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id)) &&
|
|
37
40
|
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id : any) => typeof target_id === "string")
|
|
38
41
|
)
|