triangle-types 1.0.55 → 1.0.56

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.
@@ -1,7 +1,7 @@
1
1
  import { StateID } from "../State.js";
2
2
  export declare class FederalCongressDistrict {
3
3
  readonly federal_congress_district_id: string;
4
- readonly congress_id: number;
4
+ readonly federal_congress_id: number;
5
5
  readonly chamber_id: string;
6
6
  readonly state_id: StateID;
7
7
  readonly district_id: number;
@@ -1,7 +1,7 @@
1
1
  import { is_state_id } from "../State.js";
2
2
  export class FederalCongressDistrict {
3
3
  federal_congress_district_id;
4
- congress_id;
4
+ federal_congress_id;
5
5
  chamber_id;
6
6
  state_id;
7
7
  district_id;
@@ -10,7 +10,7 @@ export class FederalCongressDistrict {
10
10
  throw Error("Invalid input.");
11
11
  }
12
12
  this.federal_congress_district_id = federal_congress_district.federal_congress_district_id;
13
- this.congress_id = federal_congress_district.congress_id;
13
+ this.federal_congress_id = federal_congress_district.federal_congress_id;
14
14
  this.chamber_id = federal_congress_district.chamber_id;
15
15
  this.state_id = federal_congress_district.state_id;
16
16
  this.district_id = federal_congress_district.district_id;
@@ -18,9 +18,9 @@ export class FederalCongressDistrict {
18
18
  static is(federal_congress_district) {
19
19
  return (federal_congress_district !== undefined &&
20
20
  typeof federal_congress_district.federal_congress_district_id === "string" &&
21
- typeof federal_congress_district.congress_id === "string" &&
21
+ typeof federal_congress_district.federal_congress_id === "number" &&
22
22
  typeof federal_congress_district.chamber_id === "string" &&
23
23
  is_state_id(federal_congress_district.state_id) &&
24
- typeof federal_congress_district === "number");
24
+ typeof federal_congress_district.district_id === "number");
25
25
  }
26
26
  }
@@ -18,9 +18,9 @@ export class StateLegislatureDistrict {
18
18
  static is(state_legislature_district) {
19
19
  return (state_legislature_district !== undefined &&
20
20
  typeof state_legislature_district.state_legislature_district_id === "string" &&
21
- typeof state_legislature_district.legislature_id === "string" &&
21
+ typeof state_legislature_district.legislature_id === "number" &&
22
22
  is_state_id(state_legislature_district.state_id) &&
23
23
  typeof state_legislature_district.chamber_id === "string" &&
24
- typeof state_legislature_district === "number");
24
+ typeof state_legislature_district.district_id === "number");
25
25
  }
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -2,7 +2,7 @@ import { is_state_id, StateID } from "../State"
2
2
 
3
3
  export class FederalCongressDistrict {
4
4
  readonly federal_congress_district_id : string
5
- readonly congress_id : number
5
+ readonly federal_congress_id : number
6
6
  readonly chamber_id : string
7
7
  readonly state_id : StateID
8
8
  readonly district_id : number
@@ -13,7 +13,7 @@ export class FederalCongressDistrict {
13
13
  throw Error("Invalid input.")
14
14
  }
15
15
  this.federal_congress_district_id = federal_congress_district.federal_congress_district_id
16
- this.congress_id = federal_congress_district.congress_id
16
+ this.federal_congress_id = federal_congress_district.federal_congress_id
17
17
  this.chamber_id = federal_congress_district.chamber_id
18
18
  this.state_id = federal_congress_district.state_id
19
19
  this.district_id = federal_congress_district.district_id
@@ -23,10 +23,10 @@ export class FederalCongressDistrict {
23
23
  return (
24
24
  federal_congress_district !== undefined &&
25
25
  typeof federal_congress_district.federal_congress_district_id === "string" &&
26
- typeof federal_congress_district.congress_id === "string" &&
26
+ typeof federal_congress_district.federal_congress_id === "number" &&
27
27
  typeof federal_congress_district.chamber_id === "string" &&
28
28
  is_state_id(federal_congress_district.state_id) &&
29
- typeof federal_congress_district === "number"
29
+ typeof federal_congress_district.district_id === "number"
30
30
  )
31
31
  }
32
32
 
@@ -23,10 +23,10 @@ export class StateLegislatureDistrict {
23
23
  return (
24
24
  state_legislature_district !== undefined &&
25
25
  typeof state_legislature_district.state_legislature_district_id === "string" &&
26
- typeof state_legislature_district.legislature_id === "string" &&
26
+ typeof state_legislature_district.legislature_id === "number" &&
27
27
  is_state_id(state_legislature_district.state_id) &&
28
28
  typeof state_legislature_district.chamber_id === "string" &&
29
- typeof state_legislature_district === "number"
29
+ typeof state_legislature_district.district_id === "number"
30
30
  )
31
31
  }
32
32