triangle-types 1.0.131 → 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.
|
@@ -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
|
@@ -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
|
|