triangle-types 1.0.157 → 1.0.158

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.
@@ -8,6 +8,7 @@ export declare class FederalCensusBlock {
8
8
  readonly tract_id: string;
9
9
  readonly block_id: string;
10
10
  readonly state_id: StateID;
11
+ readonly name: string;
11
12
  constructor(federal_census_block: any);
12
13
  static is(federal_census_block: any): federal_census_block is FederalCensusBlock;
13
14
  }
@@ -8,6 +8,7 @@ export class FederalCensusBlock {
8
8
  tract_id;
9
9
  block_id;
10
10
  state_id;
11
+ name;
11
12
  constructor(federal_census_block) {
12
13
  if (!FederalCensusBlock.is(federal_census_block)) {
13
14
  throw Error("Invalid input.");
@@ -20,6 +21,7 @@ export class FederalCensusBlock {
20
21
  this.tract_id = federal_census_block.tract_id;
21
22
  this.block_id = federal_census_block.block_id;
22
23
  this.state_id = federal_census_block.state_id;
24
+ this.name = federal_census_block.name;
23
25
  }
24
26
  static is(federal_census_block) {
25
27
  return (federal_census_block !== undefined &&
@@ -30,6 +32,7 @@ export class FederalCensusBlock {
30
32
  typeof federal_census_block.county_id === "string" &&
31
33
  typeof federal_census_block.tract_id === "string" &&
32
34
  typeof federal_census_block.block_id === "string" &&
33
- is_state_id(federal_census_block.state_id));
35
+ is_state_id(federal_census_block.state_id) &&
36
+ typeof federal_census_block.name === "string");
34
37
  }
35
38
  }
@@ -4,6 +4,7 @@ export declare class FederalCensusCounty {
4
4
  readonly federal_census_id: number;
5
5
  readonly county_id: string;
6
6
  readonly state_id: StateID;
7
+ readonly name: string;
7
8
  constructor(federal_census: any);
8
9
  static is(federal_census: any): federal_census is FederalCensusCounty;
9
10
  }
@@ -4,6 +4,7 @@ export class FederalCensusCounty {
4
4
  federal_census_id;
5
5
  county_id;
6
6
  state_id;
7
+ name;
7
8
  constructor(federal_census) {
8
9
  if (!FederalCensusCounty.is(federal_census)) {
9
10
  throw Error("Invalid input.");
@@ -12,12 +13,14 @@ export class FederalCensusCounty {
12
13
  this.federal_census_id = federal_census.federal_census_id;
13
14
  this.county_id = federal_census.county_id;
14
15
  this.state_id = federal_census.state_id;
16
+ this.name = federal_census.name;
15
17
  }
16
18
  static is(federal_census) {
17
19
  return (federal_census !== undefined &&
18
20
  typeof federal_census.federal_census_county_id === "string" &&
19
21
  typeof federal_census.federal_census_id === "number" &&
20
22
  typeof federal_census.county_id === "string" &&
21
- is_state_id(federal_census.state_id));
23
+ is_state_id(federal_census.state_id) &&
24
+ typeof federal_census.name === "string");
22
25
  }
23
26
  }
@@ -6,6 +6,7 @@ export declare class FederalCensusTract {
6
6
  readonly county_id: string;
7
7
  readonly tract_id: string;
8
8
  readonly state_id: StateID;
9
+ readonly name: string;
9
10
  constructor(federal_census_tract: any);
10
11
  static is(federal_census_tract: any): federal_census_tract is FederalCensusTract;
11
12
  }
@@ -6,6 +6,7 @@ export class FederalCensusTract {
6
6
  county_id;
7
7
  tract_id;
8
8
  state_id;
9
+ name;
9
10
  constructor(federal_census_tract) {
10
11
  if (!FederalCensusTract.is(federal_census_tract)) {
11
12
  throw Error("Invalid input.");
@@ -16,6 +17,7 @@ export class FederalCensusTract {
16
17
  this.county_id = federal_census_tract.county_id;
17
18
  this.tract_id = federal_census_tract.tract_id;
18
19
  this.state_id = federal_census_tract.state_id;
20
+ this.name = federal_census_tract.name;
19
21
  }
20
22
  static is(federal_census_tract) {
21
23
  return (federal_census_tract !== undefined &&
@@ -24,6 +26,7 @@ export class FederalCensusTract {
24
26
  typeof federal_census_tract.federal_census_id === "number" &&
25
27
  typeof federal_census_tract.county_id === "string" &&
26
28
  typeof federal_census_tract.tract_id === "string" &&
27
- is_state_id(federal_census_tract.state_id));
29
+ is_state_id(federal_census_tract.state_id) &&
30
+ typeof federal_census_tract.name === "string");
28
31
  }
29
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -9,6 +9,7 @@ export class FederalCensusBlock {
9
9
  readonly tract_id : string
10
10
  readonly block_id : string
11
11
  readonly state_id : StateID
12
+ readonly name : string
12
13
 
13
14
  constructor(federal_census_block : any) {
14
15
  if (!FederalCensusBlock.is(federal_census_block)) {
@@ -22,6 +23,7 @@ export class FederalCensusBlock {
22
23
  this.tract_id = federal_census_block.tract_id
23
24
  this.block_id = federal_census_block.block_id
24
25
  this.state_id = federal_census_block.state_id
26
+ this.name = federal_census_block.name
25
27
  }
26
28
 
27
29
  static is(federal_census_block : any) : federal_census_block is FederalCensusBlock {
@@ -34,7 +36,8 @@ export class FederalCensusBlock {
34
36
  typeof federal_census_block.county_id === "string" &&
35
37
  typeof federal_census_block.tract_id === "string" &&
36
38
  typeof federal_census_block.block_id === "string" &&
37
- is_state_id(federal_census_block.state_id)
39
+ is_state_id(federal_census_block.state_id) &&
40
+ typeof federal_census_block.name === "string"
38
41
  )
39
42
  }
40
43
 
@@ -5,6 +5,7 @@ export class FederalCensusCounty {
5
5
  readonly federal_census_id : number
6
6
  readonly county_id : string
7
7
  readonly state_id : StateID
8
+ readonly name : string
8
9
 
9
10
  constructor(federal_census : any) {
10
11
  if (!FederalCensusCounty.is(federal_census)) {
@@ -14,6 +15,7 @@ export class FederalCensusCounty {
14
15
  this.federal_census_id = federal_census.federal_census_id
15
16
  this.county_id = federal_census.county_id
16
17
  this.state_id = federal_census.state_id
18
+ this.name = federal_census.name
17
19
  }
18
20
 
19
21
  static is(federal_census : any) : federal_census is FederalCensusCounty {
@@ -22,7 +24,8 @@ export class FederalCensusCounty {
22
24
  typeof federal_census.federal_census_county_id === "string" &&
23
25
  typeof federal_census.federal_census_id === "number" &&
24
26
  typeof federal_census.county_id === "string" &&
25
- is_state_id(federal_census.state_id)
27
+ is_state_id(federal_census.state_id) &&
28
+ typeof federal_census.name === "string"
26
29
  )
27
30
  }
28
31
 
@@ -7,6 +7,7 @@ export class FederalCensusTract {
7
7
  readonly county_id : string
8
8
  readonly tract_id : string
9
9
  readonly state_id : StateID
10
+ readonly name : string
10
11
 
11
12
  constructor(federal_census_tract : any) {
12
13
  if (!FederalCensusTract.is(federal_census_tract)) {
@@ -18,6 +19,7 @@ export class FederalCensusTract {
18
19
  this.county_id = federal_census_tract.county_id
19
20
  this.tract_id = federal_census_tract.tract_id
20
21
  this.state_id = federal_census_tract.state_id
22
+ this.name = federal_census_tract.name
21
23
  }
22
24
 
23
25
  static is(federal_census_tract : any) : federal_census_tract is FederalCensusTract {
@@ -28,7 +30,8 @@ export class FederalCensusTract {
28
30
  typeof federal_census_tract.federal_census_id === "number" &&
29
31
  typeof federal_census_tract.county_id === "string" &&
30
32
  typeof federal_census_tract.tract_id === "string" &&
31
- is_state_id(federal_census_tract.state_id)
33
+ is_state_id(federal_census_tract.state_id) &&
34
+ typeof federal_census_tract.name === "string"
32
35
  )
33
36
  }
34
37