triangle-types 1.0.162 → 1.0.164
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/federal_census/FederalCensus.d.ts +1 -0
- package/dist/src/types/federal_census/FederalCensus.js +4 -1
- package/dist/src/types/federal_census/FederalCensusCounty.d.ts +2 -0
- package/dist/src/types/federal_census/FederalCensusCounty.js +7 -1
- package/package.json +1 -1
- package/src/types/federal_census/FederalCensus.ts +4 -1
- package/src/types/federal_census/FederalCensusCounty.ts +7 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export class FederalCensus {
|
|
2
2
|
federal_census_id;
|
|
3
|
+
is_decennial;
|
|
3
4
|
constructor(federal_census) {
|
|
4
5
|
if (!FederalCensus.is(federal_census)) {
|
|
5
6
|
throw Error("Invalid input.");
|
|
6
7
|
}
|
|
7
8
|
this.federal_census_id = federal_census.federal_census_id;
|
|
9
|
+
this.is_decennial = federal_census.is_decennial;
|
|
8
10
|
}
|
|
9
11
|
static is(federal_census) {
|
|
10
12
|
return (federal_census !== undefined &&
|
|
11
|
-
typeof federal_census.federal_census_id === "number"
|
|
13
|
+
typeof federal_census.federal_census_id === "number" &&
|
|
14
|
+
typeof federal_census.is_decennial === "boolean");
|
|
12
15
|
}
|
|
13
16
|
}
|
|
@@ -5,6 +5,8 @@ export declare class FederalCensusCounty {
|
|
|
5
5
|
readonly county_id: string;
|
|
6
6
|
readonly state_id: StateID;
|
|
7
7
|
readonly name: string;
|
|
8
|
+
readonly county_type_id: string;
|
|
9
|
+
readonly function_type_id: string;
|
|
8
10
|
constructor(federal_census_county: any);
|
|
9
11
|
static is(federal_census_county: any): federal_census_county is FederalCensusCounty;
|
|
10
12
|
}
|
|
@@ -5,6 +5,8 @@ export class FederalCensusCounty {
|
|
|
5
5
|
county_id;
|
|
6
6
|
state_id;
|
|
7
7
|
name;
|
|
8
|
+
county_type_id;
|
|
9
|
+
function_type_id;
|
|
8
10
|
constructor(federal_census_county) {
|
|
9
11
|
if (!FederalCensusCounty.is(federal_census_county)) {
|
|
10
12
|
throw Error("Invalid input.");
|
|
@@ -14,6 +16,8 @@ export class FederalCensusCounty {
|
|
|
14
16
|
this.county_id = federal_census_county.county_id;
|
|
15
17
|
this.state_id = federal_census_county.state_id;
|
|
16
18
|
this.name = federal_census_county.name;
|
|
19
|
+
this.county_type_id = federal_census_county.county_type_id;
|
|
20
|
+
this.function_type_id = federal_census_county.function_type_id;
|
|
17
21
|
}
|
|
18
22
|
static is(federal_census_county) {
|
|
19
23
|
return (federal_census_county !== undefined &&
|
|
@@ -21,6 +25,8 @@ export class FederalCensusCounty {
|
|
|
21
25
|
typeof federal_census_county.federal_census_id === "number" &&
|
|
22
26
|
typeof federal_census_county.county_id === "string" &&
|
|
23
27
|
is_state_id(federal_census_county.state_id) &&
|
|
24
|
-
typeof federal_census_county.name === "string"
|
|
28
|
+
typeof federal_census_county.name === "string" &&
|
|
29
|
+
typeof federal_census_county.county_type_id === "string" &&
|
|
30
|
+
typeof federal_census_county.function_type_id === "string");
|
|
25
31
|
}
|
|
26
32
|
}
|
package/package.json
CHANGED
|
@@ -2,18 +2,21 @@ import { is_state_id, StateID } from "../regions/State"
|
|
|
2
2
|
|
|
3
3
|
export class FederalCensus {
|
|
4
4
|
readonly federal_census_id : number
|
|
5
|
+
readonly is_decennial : boolean
|
|
5
6
|
|
|
6
7
|
constructor(federal_census : any) {
|
|
7
8
|
if (!FederalCensus.is(federal_census)) {
|
|
8
9
|
throw Error("Invalid input.")
|
|
9
10
|
}
|
|
10
11
|
this.federal_census_id = federal_census.federal_census_id
|
|
12
|
+
this.is_decennial = federal_census.is_decennial
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
static is(federal_census : any) : federal_census is FederalCensus {
|
|
14
16
|
return (
|
|
15
17
|
federal_census !== undefined &&
|
|
16
|
-
typeof federal_census.federal_census_id === "number"
|
|
18
|
+
typeof federal_census.federal_census_id === "number" &&
|
|
19
|
+
typeof federal_census.is_decennial === "boolean"
|
|
17
20
|
)
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -6,6 +6,8 @@ export class FederalCensusCounty {
|
|
|
6
6
|
readonly county_id : string
|
|
7
7
|
readonly state_id : StateID
|
|
8
8
|
readonly name : string
|
|
9
|
+
readonly county_type_id : string
|
|
10
|
+
readonly function_type_id : string
|
|
9
11
|
|
|
10
12
|
constructor(federal_census_county : any) {
|
|
11
13
|
if (!FederalCensusCounty.is(federal_census_county)) {
|
|
@@ -16,6 +18,8 @@ export class FederalCensusCounty {
|
|
|
16
18
|
this.county_id = federal_census_county.county_id
|
|
17
19
|
this.state_id = federal_census_county.state_id
|
|
18
20
|
this.name = federal_census_county.name
|
|
21
|
+
this.county_type_id = federal_census_county.county_type_id
|
|
22
|
+
this.function_type_id = federal_census_county.function_type_id
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
static is(federal_census_county : any) : federal_census_county is FederalCensusCounty {
|
|
@@ -25,7 +29,9 @@ export class FederalCensusCounty {
|
|
|
25
29
|
typeof federal_census_county.federal_census_id === "number" &&
|
|
26
30
|
typeof federal_census_county.county_id === "string" &&
|
|
27
31
|
is_state_id(federal_census_county.state_id) &&
|
|
28
|
-
typeof federal_census_county.name === "string"
|
|
32
|
+
typeof federal_census_county.name === "string" &&
|
|
33
|
+
typeof federal_census_county.county_type_id === "string" &&
|
|
34
|
+
typeof federal_census_county.function_type_id === "string"
|
|
29
35
|
)
|
|
30
36
|
}
|
|
31
37
|
|