triangle-types 1.0.130 → 1.0.132
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.
- package/dist/src/types/scout/Scout.d.ts +2 -2
- package/dist/src/types/scout/Scout.js +6 -6
- package/dist/src/types/state_legislature/StateLegislatureDistrict.d.ts +1 -0
- package/dist/src/types/state_legislature/StateLegislatureDistrict.js +4 -1
- package/package.json +1 -1
- package/src/types/scout/Scout.ts +6 -6
- package/src/types/state_legislature/StateLegislatureDistrict.ts +4 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class Scout {
|
|
2
2
|
readonly scout_id: string;
|
|
3
3
|
readonly name: string;
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
4
|
+
readonly ballotpedia_article_id?: string;
|
|
5
|
+
readonly wikipedia_article_id?: string;
|
|
6
6
|
readonly s3_id_img?: string;
|
|
7
7
|
readonly [x: string]: any;
|
|
8
8
|
constructor(scout: any);
|
|
@@ -7,8 +7,8 @@ export class Scout {
|
|
|
7
7
|
scout_id;
|
|
8
8
|
// readonly scout_type_id : ScoutTypeID
|
|
9
9
|
name;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
ballotpedia_article_id;
|
|
11
|
+
wikipedia_article_id;
|
|
12
12
|
s3_id_img;
|
|
13
13
|
constructor(scout) {
|
|
14
14
|
if (!Scout.is(scout)) {
|
|
@@ -17,8 +17,8 @@ export class Scout {
|
|
|
17
17
|
this.scout_id = scout.scout_id;
|
|
18
18
|
// this.scout_type_id = scout.scout_type_id
|
|
19
19
|
this.name = scout.name;
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
20
|
+
this.ballotpedia_article_id = scout.ballotpedia_article_id;
|
|
21
|
+
this.wikipedia_article_id = scout.wikipedia_article_id;
|
|
22
22
|
this.s3_id_img = scout.s3_id_img;
|
|
23
23
|
}
|
|
24
24
|
static is(scout) {
|
|
@@ -26,8 +26,8 @@ export class Scout {
|
|
|
26
26
|
typeof scout.scout_id === "string" &&
|
|
27
27
|
// is_scout_type_id(scout.scout_type_id) &&
|
|
28
28
|
typeof scout.name === "string" &&
|
|
29
|
-
(scout.
|
|
30
|
-
(scout.
|
|
29
|
+
(scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
|
|
30
|
+
(scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
|
|
31
31
|
(scout.s3_id_img === undefined || typeof scout.s3_id_img === "string"));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -5,6 +5,7 @@ export declare class StateLegislatureDistrict {
|
|
|
5
5
|
readonly legislature_id: number;
|
|
6
6
|
readonly chamber_id: string;
|
|
7
7
|
readonly district_id: number;
|
|
8
|
+
readonly name: string;
|
|
8
9
|
constructor(state_legislature_district: any);
|
|
9
10
|
static is(state_legislature_district: any): state_legislature_district is StateLegislatureDistrict;
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@ export class StateLegislatureDistrict {
|
|
|
5
5
|
legislature_id;
|
|
6
6
|
chamber_id;
|
|
7
7
|
district_id;
|
|
8
|
+
name;
|
|
8
9
|
constructor(state_legislature_district) {
|
|
9
10
|
if (!StateLegislatureDistrict.is(state_legislature_district)) {
|
|
10
11
|
throw Error("Invalid input.");
|
|
@@ -14,6 +15,7 @@ export class StateLegislatureDistrict {
|
|
|
14
15
|
this.legislature_id = state_legislature_district.legislature_id;
|
|
15
16
|
this.chamber_id = state_legislature_district.chamber_id;
|
|
16
17
|
this.district_id = state_legislature_district.district_id;
|
|
18
|
+
this.name = state_legislature_district.name;
|
|
17
19
|
}
|
|
18
20
|
static is(state_legislature_district) {
|
|
19
21
|
return (state_legislature_district !== undefined &&
|
|
@@ -21,6 +23,7 @@ export class StateLegislatureDistrict {
|
|
|
21
23
|
is_state_id(state_legislature_district.state_id) &&
|
|
22
24
|
typeof state_legislature_district.legislature_id === "number" &&
|
|
23
25
|
typeof state_legislature_district.chamber_id === "string" &&
|
|
24
|
-
typeof state_legislature_district.district_id === "number"
|
|
26
|
+
typeof state_legislature_district.district_id === "number" &&
|
|
27
|
+
typeof state_legislature_district.name === "string");
|
|
25
28
|
}
|
|
26
29
|
}
|
package/package.json
CHANGED
package/src/types/scout/Scout.ts
CHANGED
|
@@ -13,8 +13,8 @@ export class Scout {
|
|
|
13
13
|
readonly scout_id : string
|
|
14
14
|
// readonly scout_type_id : ScoutTypeID
|
|
15
15
|
readonly name : string
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
16
|
+
readonly ballotpedia_article_id? : string
|
|
17
|
+
readonly wikipedia_article_id? : string
|
|
18
18
|
readonly s3_id_img? : string
|
|
19
19
|
readonly [x : string] : any
|
|
20
20
|
|
|
@@ -25,8 +25,8 @@ export class Scout {
|
|
|
25
25
|
this.scout_id = scout.scout_id
|
|
26
26
|
// this.scout_type_id = scout.scout_type_id
|
|
27
27
|
this.name = scout.name
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
28
|
+
this.ballotpedia_article_id = scout.ballotpedia_article_id
|
|
29
|
+
this.wikipedia_article_id = scout.wikipedia_article_id
|
|
30
30
|
this.s3_id_img = scout.s3_id_img
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -36,8 +36,8 @@ export class Scout {
|
|
|
36
36
|
typeof scout.scout_id === "string" &&
|
|
37
37
|
// is_scout_type_id(scout.scout_type_id) &&
|
|
38
38
|
typeof scout.name === "string" &&
|
|
39
|
-
(scout.
|
|
40
|
-
(scout.
|
|
39
|
+
(scout.ballotpedia_article_id === undefined || typeof scout.ballotpedia_article_id === "string") &&
|
|
40
|
+
(scout.wikipedia_article_id === undefined || typeof scout.wikipedia_article_id === "string") &&
|
|
41
41
|
(scout.s3_id_img === undefined || typeof scout.s3_id_img === "string")
|
|
42
42
|
)
|
|
43
43
|
}
|
|
@@ -6,6 +6,7 @@ export class StateLegislatureDistrict {
|
|
|
6
6
|
readonly legislature_id : number
|
|
7
7
|
readonly chamber_id : string
|
|
8
8
|
readonly district_id : number
|
|
9
|
+
readonly name : string
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
constructor(state_legislature_district : any) {
|
|
@@ -17,6 +18,7 @@ export class StateLegislatureDistrict {
|
|
|
17
18
|
this.legislature_id = state_legislature_district.legislature_id
|
|
18
19
|
this.chamber_id = state_legislature_district.chamber_id
|
|
19
20
|
this.district_id = state_legislature_district.district_id
|
|
21
|
+
this.name = state_legislature_district.name
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
static is(state_legislature_district : any) : state_legislature_district is StateLegislatureDistrict {
|
|
@@ -26,7 +28,8 @@ export class StateLegislatureDistrict {
|
|
|
26
28
|
is_state_id(state_legislature_district.state_id) &&
|
|
27
29
|
typeof state_legislature_district.legislature_id === "number" &&
|
|
28
30
|
typeof state_legislature_district.chamber_id === "string" &&
|
|
29
|
-
typeof state_legislature_district.district_id === "number"
|
|
31
|
+
typeof state_legislature_district.district_id === "number" &&
|
|
32
|
+
typeof state_legislature_district.name === "string"
|
|
30
33
|
)
|
|
31
34
|
}
|
|
32
35
|
|