triangle-types 1.0.288 → 1.0.290
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.
|
@@ -10,6 +10,7 @@ export declare class Prism {
|
|
|
10
10
|
readonly sub_jurisdiction_type_ids: JurisdictionTypeID[];
|
|
11
11
|
readonly party_type_ids?: VoterPartyTypeID[];
|
|
12
12
|
readonly target_ids: string[];
|
|
13
|
+
readonly layers_json: string;
|
|
13
14
|
readonly [x: string]: any;
|
|
14
15
|
constructor(prism: any);
|
|
15
16
|
static is(prism: any): prism is Prism;
|
|
@@ -10,6 +10,7 @@ export class Prism {
|
|
|
10
10
|
sub_jurisdiction_type_ids;
|
|
11
11
|
party_type_ids;
|
|
12
12
|
target_ids;
|
|
13
|
+
layers_json;
|
|
13
14
|
constructor(prism) {
|
|
14
15
|
if (!Prism.is(prism)) {
|
|
15
16
|
throw Error("Invalid input.");
|
|
@@ -22,6 +23,7 @@ export class Prism {
|
|
|
22
23
|
this.sub_jurisdiction_type_ids = prism.sub_jurisdiction_type_ids;
|
|
23
24
|
this.party_type_ids = prism.party_type_ids;
|
|
24
25
|
this.target_ids = prism.target_ids;
|
|
26
|
+
this.layers_json = prism.layers_json;
|
|
25
27
|
}
|
|
26
28
|
static is(prism) {
|
|
27
29
|
return (prism !== undefined &&
|
|
@@ -32,6 +34,7 @@ export class Prism {
|
|
|
32
34
|
typeof prism.jurisdiction_id === "string" &&
|
|
33
35
|
Array.isArray(prism.sub_jurisdiction_type_ids) && prism.sub_jurisdiction_type_ids.every(is_jurisdiction_type_id) &&
|
|
34
36
|
(prism.party_type_ids === undefined || Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id)) &&
|
|
35
|
-
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id) => typeof target_id === "string")
|
|
37
|
+
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id) => typeof target_id === "string") &&
|
|
38
|
+
typeof prism.layers_json === "string");
|
|
36
39
|
}
|
|
37
40
|
}
|
package/package.json
CHANGED
package/src/types/prism/Prism.ts
CHANGED
|
@@ -11,6 +11,7 @@ export class Prism {
|
|
|
11
11
|
readonly sub_jurisdiction_type_ids : JurisdictionTypeID[]
|
|
12
12
|
readonly party_type_ids? : VoterPartyTypeID[]
|
|
13
13
|
readonly target_ids : string[]
|
|
14
|
+
readonly layers_json : string
|
|
14
15
|
readonly [x : string] : any
|
|
15
16
|
|
|
16
17
|
constructor(prism : any) {
|
|
@@ -25,6 +26,7 @@ export class Prism {
|
|
|
25
26
|
this.sub_jurisdiction_type_ids = prism.sub_jurisdiction_type_ids
|
|
26
27
|
this.party_type_ids = prism.party_type_ids
|
|
27
28
|
this.target_ids = prism.target_ids
|
|
29
|
+
this.layers_json = prism.layers_json
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
static is(prism : any) : prism is Prism {
|
|
@@ -37,7 +39,8 @@ export class Prism {
|
|
|
37
39
|
typeof prism.jurisdiction_id === "string" &&
|
|
38
40
|
Array.isArray(prism.sub_jurisdiction_type_ids) && prism.sub_jurisdiction_type_ids.every(is_jurisdiction_type_id) &&
|
|
39
41
|
(prism.party_type_ids === undefined || Array.isArray(prism.party_type_ids) && prism.party_type_ids.every(is_voter_party_type_id)) &&
|
|
40
|
-
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id : any) => typeof target_id === "string")
|
|
42
|
+
Array.isArray(prism.target_ids) && prism.target_ids.every((target_id : any) => typeof target_id === "string") &&
|
|
43
|
+
typeof prism.layers_json === "string"
|
|
41
44
|
)
|
|
42
45
|
}
|
|
43
46
|
}
|