triangle-types 1.0.283 → 1.0.285
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/jurisdictions/County.d.ts +2 -6
- package/dist/src/types/jurisdictions/County.js +5 -16
- package/dist/src/types/jurisdictions/Jurisdiction.d.ts +4 -4
- package/dist/src/types/jurisdictions/Jurisdiction.js +4 -4
- package/dist/src/types/jurisdictions/Municipality.d.ts +2 -6
- package/dist/src/types/jurisdictions/Municipality.js +5 -16
- package/dist/src/types/jurisdictions/SchoolDistrict.d.ts +2 -6
- package/dist/src/types/jurisdictions/SchoolDistrict.js +5 -16
- package/package.json +1 -1
- package/src/types/jurisdictions/County.ts +5 -21
- package/src/types/jurisdictions/Jurisdiction.ts +6 -6
- package/src/types/jurisdictions/Municipality.ts +5 -21
- package/src/types/jurisdictions/SchoolDistrict.ts +5 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { StateID } from "./State.js";
|
|
3
3
|
export declare class County {
|
|
4
4
|
readonly county_id: string;
|
|
@@ -7,12 +7,8 @@ export declare class County {
|
|
|
7
7
|
readonly function_type_id: string;
|
|
8
8
|
readonly name: string;
|
|
9
9
|
readonly federal_census_county_id: string;
|
|
10
|
+
readonly geom: Geom;
|
|
10
11
|
readonly [x: string]: any;
|
|
11
12
|
constructor(county: any);
|
|
12
13
|
static is(county: any): county is County;
|
|
13
14
|
}
|
|
14
|
-
export declare class CountyAux extends County {
|
|
15
|
-
readonly federal_census_county: FederalCensusCounty;
|
|
16
|
-
constructor(county: CountyAux);
|
|
17
|
-
static is(county: any): county is CountyAux;
|
|
18
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { is_state_id } from "./State.js";
|
|
3
3
|
export class County {
|
|
4
4
|
county_id;
|
|
@@ -7,6 +7,7 @@ export class County {
|
|
|
7
7
|
function_type_id;
|
|
8
8
|
name;
|
|
9
9
|
federal_census_county_id;
|
|
10
|
+
geom;
|
|
10
11
|
constructor(county) {
|
|
11
12
|
if (!County.is(county)) {
|
|
12
13
|
throw Error("Invalid input.");
|
|
@@ -17,6 +18,7 @@ export class County {
|
|
|
17
18
|
this.function_type_id = county.function_type_id;
|
|
18
19
|
this.name = county.name;
|
|
19
20
|
this.federal_census_county_id = county.federal_census_county_id;
|
|
21
|
+
this.geom = county.geom;
|
|
20
22
|
}
|
|
21
23
|
static is(county) {
|
|
22
24
|
return (county !== undefined &&
|
|
@@ -25,20 +27,7 @@ export class County {
|
|
|
25
27
|
typeof county.county_type_id === "string" &&
|
|
26
28
|
typeof county.function_type_id === "string" &&
|
|
27
29
|
typeof county.name === "string" &&
|
|
28
|
-
typeof county.federal_census_county_id === "string"
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
export class CountyAux extends County {
|
|
32
|
-
federal_census_county;
|
|
33
|
-
constructor(county) {
|
|
34
|
-
if (!CountyAux.is(county)) {
|
|
35
|
-
throw Error("Invalid input.");
|
|
36
|
-
}
|
|
37
|
-
super(county);
|
|
38
|
-
this.federal_census_county = county.federal_census_county;
|
|
39
|
-
}
|
|
40
|
-
static is(county) {
|
|
41
|
-
return (County.is(county) &&
|
|
42
|
-
FederalCensusCounty.is(county.federal_census_county));
|
|
30
|
+
typeof county.federal_census_county_id === "string" &&
|
|
31
|
+
Geom.is(county.geom));
|
|
43
32
|
}
|
|
44
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FederalCensusTract } from "../federal_census/FederalCensusTract.js";
|
|
2
|
-
import {
|
|
2
|
+
import { County } from "./County.js";
|
|
3
3
|
import { JurisdictionMetric } from "./JurisdictionMetric.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Municipality } from "./Municipality.js";
|
|
5
5
|
import { SchoolDistrict } from "./SchoolDistrict.js";
|
|
6
6
|
export declare const jurisdiction_type_ids: readonly ["state", "federal_congress_district", "state_legislature_district", "county", "municipality", "school_district", "federal_census_tract", "federal_census_block"];
|
|
7
7
|
export type JurisdictionTypeID = typeof jurisdiction_type_ids[number];
|
|
@@ -20,13 +20,13 @@ export declare class JurisdictionAux extends Jurisdiction {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class CountyJurisdictionAux extends JurisdictionAux {
|
|
22
22
|
readonly jurisdiction_type_id: "county";
|
|
23
|
-
readonly county:
|
|
23
|
+
readonly county: County;
|
|
24
24
|
constructor(jurisdiction: any);
|
|
25
25
|
static is(jurisdiction: any): jurisdiction is CountyJurisdictionAux;
|
|
26
26
|
}
|
|
27
27
|
export declare class MunicipalityJurisdictionAux extends JurisdictionAux {
|
|
28
28
|
readonly jurisdiction_type_id: "municipality";
|
|
29
|
-
readonly municipality:
|
|
29
|
+
readonly municipality: Municipality;
|
|
30
30
|
constructor(jurisdiction: any);
|
|
31
31
|
static is(jurisdiction: any): jurisdiction is MunicipalityJurisdictionAux;
|
|
32
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FederalCensusTract } from "../federal_census/FederalCensusTract.js";
|
|
2
|
-
import {
|
|
2
|
+
import { County } from "./County.js";
|
|
3
3
|
import { JurisdictionMetric } from "./JurisdictionMetric.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Municipality } from "./Municipality.js";
|
|
5
5
|
import { SchoolDistrict } from "./SchoolDistrict.js";
|
|
6
6
|
export const jurisdiction_type_ids = ["state", "federal_congress_district", "state_legislature_district", "county", "municipality", "school_district", "federal_census_tract", "federal_census_block"];
|
|
7
7
|
export function is_jurisdiction_type_id(jurisdiction_type_id) {
|
|
@@ -51,7 +51,7 @@ export class CountyJurisdictionAux extends JurisdictionAux {
|
|
|
51
51
|
static is(jurisdiction) {
|
|
52
52
|
return (jurisdiction !== undefined &&
|
|
53
53
|
jurisdiction.jurisdiction_type_id === "county" &&
|
|
54
|
-
|
|
54
|
+
County.is(jurisdiction.county));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
export class MunicipalityJurisdictionAux extends JurisdictionAux {
|
|
@@ -68,7 +68,7 @@ export class MunicipalityJurisdictionAux extends JurisdictionAux {
|
|
|
68
68
|
static is(jurisdiction) {
|
|
69
69
|
return (jurisdiction !== undefined &&
|
|
70
70
|
jurisdiction.jurisdiction_type_id === "municipality" &&
|
|
71
|
-
|
|
71
|
+
Municipality.is(jurisdiction.municipality));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
export class FederalCensusTractJurisdictionAux extends JurisdictionAux {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { StateID } from "./State.js";
|
|
3
3
|
export declare class Municipality {
|
|
4
4
|
readonly municipality_id: string;
|
|
@@ -6,12 +6,8 @@ export declare class Municipality {
|
|
|
6
6
|
readonly municipality_type_id?: string;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly federal_census_municipality_id: string;
|
|
9
|
+
readonly geom: Geom;
|
|
9
10
|
readonly [x: string]: any;
|
|
10
11
|
constructor(municipality: any);
|
|
11
12
|
static is(municipality: any): municipality is Municipality;
|
|
12
13
|
}
|
|
13
|
-
export declare class MunicipalityAux extends Municipality {
|
|
14
|
-
readonly federal_census_municipality: FederalCensusMunicipality;
|
|
15
|
-
constructor(municipality: MunicipalityAux);
|
|
16
|
-
static is(municipality: any): municipality is MunicipalityAux;
|
|
17
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { is_state_id } from "./State.js";
|
|
3
3
|
export class Municipality {
|
|
4
4
|
municipality_id;
|
|
@@ -6,6 +6,7 @@ export class Municipality {
|
|
|
6
6
|
municipality_type_id;
|
|
7
7
|
name;
|
|
8
8
|
federal_census_municipality_id;
|
|
9
|
+
geom;
|
|
9
10
|
constructor(municipality) {
|
|
10
11
|
if (!Municipality.is(municipality)) {
|
|
11
12
|
throw Error("Invalid input.");
|
|
@@ -15,6 +16,7 @@ export class Municipality {
|
|
|
15
16
|
this.municipality_type_id = municipality.municipality_type_id;
|
|
16
17
|
this.name = municipality.name;
|
|
17
18
|
this.federal_census_municipality_id = municipality.federal_census_municipality_id;
|
|
19
|
+
this.geom = municipality.geom;
|
|
18
20
|
}
|
|
19
21
|
static is(municipality) {
|
|
20
22
|
return (municipality !== undefined &&
|
|
@@ -22,20 +24,7 @@ export class Municipality {
|
|
|
22
24
|
is_state_id(municipality.state_id) &&
|
|
23
25
|
(municipality.municipality_type_id === undefined || typeof municipality.municipality_type_id === "string") &&
|
|
24
26
|
typeof municipality.name === "string" &&
|
|
25
|
-
typeof municipality.federal_census_municipality_id === "string"
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
export class MunicipalityAux extends Municipality {
|
|
29
|
-
federal_census_municipality;
|
|
30
|
-
constructor(municipality) {
|
|
31
|
-
if (!MunicipalityAux.is(municipality)) {
|
|
32
|
-
throw Error("Invalid input.");
|
|
33
|
-
}
|
|
34
|
-
super(municipality);
|
|
35
|
-
this.federal_census_municipality = municipality.federal_census_municipality;
|
|
36
|
-
}
|
|
37
|
-
static is(municipality) {
|
|
38
|
-
return (Municipality.is(municipality) &&
|
|
39
|
-
FederalCensusMunicipality.is(municipality.federal_census_municipality));
|
|
27
|
+
typeof municipality.federal_census_municipality_id === "string" &&
|
|
28
|
+
Geom.is(municipality.geom));
|
|
40
29
|
}
|
|
41
30
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { StateID } from "./State.js";
|
|
3
3
|
export declare class SchoolDistrict {
|
|
4
4
|
readonly school_district_id: string;
|
|
5
5
|
readonly state_id: StateID;
|
|
6
6
|
readonly name: string;
|
|
7
7
|
readonly federal_census_school_district_id: string;
|
|
8
|
+
readonly geom: Geom;
|
|
8
9
|
readonly [x: string]: any;
|
|
9
10
|
constructor(school_district: any);
|
|
10
11
|
static is(school_district: any): school_district is SchoolDistrict;
|
|
11
12
|
}
|
|
12
|
-
export declare class SchoolDistrictAux extends SchoolDistrict {
|
|
13
|
-
readonly federal_census_school_district: FederalCensusSchoolDistrict;
|
|
14
|
-
constructor(school_district: SchoolDistrictAux);
|
|
15
|
-
static is(school_district: any): school_district is SchoolDistrictAux;
|
|
16
|
-
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Geom } from "./Geom.js";
|
|
2
2
|
import { is_state_id } from "./State.js";
|
|
3
3
|
export class SchoolDistrict {
|
|
4
4
|
school_district_id;
|
|
5
5
|
state_id;
|
|
6
6
|
name;
|
|
7
7
|
federal_census_school_district_id;
|
|
8
|
+
geom;
|
|
8
9
|
constructor(school_district) {
|
|
9
10
|
if (!SchoolDistrict.is(school_district)) {
|
|
10
11
|
throw Error("Invalid input.");
|
|
@@ -13,26 +14,14 @@ export class SchoolDistrict {
|
|
|
13
14
|
this.state_id = school_district.state_id;
|
|
14
15
|
this.name = school_district.name;
|
|
15
16
|
this.federal_census_school_district_id = school_district.federal_census_school_district_id;
|
|
17
|
+
this.geom = school_district.geom;
|
|
16
18
|
}
|
|
17
19
|
static is(school_district) {
|
|
18
20
|
return (school_district !== undefined &&
|
|
19
21
|
typeof school_district.school_district_id === "string" &&
|
|
20
22
|
is_state_id(school_district.state_id) &&
|
|
21
23
|
typeof school_district.name === "string" &&
|
|
22
|
-
typeof school_district.federal_census_school_district_id === "string"
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
export class SchoolDistrictAux extends SchoolDistrict {
|
|
26
|
-
federal_census_school_district;
|
|
27
|
-
constructor(school_district) {
|
|
28
|
-
if (!SchoolDistrictAux.is(school_district)) {
|
|
29
|
-
throw Error("Invalid input.");
|
|
30
|
-
}
|
|
31
|
-
super(school_district);
|
|
32
|
-
this.federal_census_school_district = school_district.federal_census_school_district;
|
|
33
|
-
}
|
|
34
|
-
static is(school_district) {
|
|
35
|
-
return (SchoolDistrict.is(school_district) &&
|
|
36
|
-
FederalCensusSchoolDistrict.is(school_district.federal_census_school_district));
|
|
24
|
+
typeof school_district.federal_census_school_district_id === "string" &&
|
|
25
|
+
Geom.is(school_district.geom));
|
|
37
26
|
}
|
|
38
27
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FederalCensusCounty } from "../federal_census/FederalCensusCounty"
|
|
2
|
+
import { Geom } from "./Geom"
|
|
2
3
|
import { is_state_id, StateID } from "./State"
|
|
3
4
|
|
|
4
5
|
export class County {
|
|
@@ -8,6 +9,7 @@ export class County {
|
|
|
8
9
|
readonly function_type_id : string
|
|
9
10
|
readonly name : string
|
|
10
11
|
readonly federal_census_county_id : string
|
|
12
|
+
readonly geom : Geom
|
|
11
13
|
readonly [x : string] : any
|
|
12
14
|
|
|
13
15
|
constructor(county : any) {
|
|
@@ -20,6 +22,7 @@ export class County {
|
|
|
20
22
|
this.function_type_id = county.function_type_id
|
|
21
23
|
this.name = county.name
|
|
22
24
|
this.federal_census_county_id = county.federal_census_county_id
|
|
25
|
+
this.geom = county.geom
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
static is(county : any) : county is County {
|
|
@@ -30,27 +33,8 @@ export class County {
|
|
|
30
33
|
typeof county.county_type_id === "string" &&
|
|
31
34
|
typeof county.function_type_id === "string" &&
|
|
32
35
|
typeof county.name === "string" &&
|
|
33
|
-
typeof county.federal_census_county_id === "string"
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class CountyAux extends County {
|
|
39
|
-
readonly federal_census_county : FederalCensusCounty
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
constructor(county : CountyAux) {
|
|
43
|
-
if (!CountyAux.is(county)) {
|
|
44
|
-
throw Error("Invalid input.")
|
|
45
|
-
}
|
|
46
|
-
super(county)
|
|
47
|
-
this.federal_census_county = county.federal_census_county
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static is(county : any) : county is CountyAux {
|
|
51
|
-
return (
|
|
52
|
-
County.is(county) &&
|
|
53
|
-
FederalCensusCounty.is(county.federal_census_county)
|
|
36
|
+
typeof county.federal_census_county_id === "string" &&
|
|
37
|
+
Geom.is(county.geom)
|
|
54
38
|
)
|
|
55
39
|
}
|
|
56
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FederalCensusTract } from "../federal_census/FederalCensusTract"
|
|
2
|
-
import { County
|
|
2
|
+
import { County } from "./County"
|
|
3
3
|
import { JurisdictionMetric } from "./JurisdictionMetric"
|
|
4
|
-
import {
|
|
4
|
+
import { Municipality } from "./Municipality"
|
|
5
5
|
import { SchoolDistrict } from "./SchoolDistrict"
|
|
6
6
|
|
|
7
7
|
export const jurisdiction_type_ids = ["state", "federal_congress_district", "state_legislature_district", "county", "municipality", "school_district", "federal_census_tract", "federal_census_block"] as const
|
|
@@ -57,7 +57,7 @@ export class JurisdictionAux extends Jurisdiction {
|
|
|
57
57
|
|
|
58
58
|
export class CountyJurisdictionAux extends JurisdictionAux {
|
|
59
59
|
readonly jurisdiction_type_id : "county"
|
|
60
|
-
readonly county :
|
|
60
|
+
readonly county : County
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
constructor(jurisdiction : any) {
|
|
@@ -73,14 +73,14 @@ export class CountyJurisdictionAux extends JurisdictionAux {
|
|
|
73
73
|
return (
|
|
74
74
|
jurisdiction !== undefined &&
|
|
75
75
|
jurisdiction.jurisdiction_type_id === "county" &&
|
|
76
|
-
|
|
76
|
+
County.is(jurisdiction.county)
|
|
77
77
|
)
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export class MunicipalityJurisdictionAux extends JurisdictionAux {
|
|
82
82
|
readonly jurisdiction_type_id : "municipality"
|
|
83
|
-
readonly municipality :
|
|
83
|
+
readonly municipality : Municipality
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
constructor(jurisdiction : any) {
|
|
@@ -96,7 +96,7 @@ export class MunicipalityJurisdictionAux extends JurisdictionAux {
|
|
|
96
96
|
return (
|
|
97
97
|
jurisdiction !== undefined &&
|
|
98
98
|
jurisdiction.jurisdiction_type_id === "municipality" &&
|
|
99
|
-
|
|
99
|
+
Municipality.is(jurisdiction.municipality)
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FederalCensusMunicipality } from "../federal_census/FederalCensusMunicipality"
|
|
2
|
+
import { Geom } from "./Geom"
|
|
2
3
|
import { is_state_id, StateID } from "./State"
|
|
3
4
|
|
|
4
5
|
export class Municipality {
|
|
@@ -7,6 +8,7 @@ export class Municipality {
|
|
|
7
8
|
readonly municipality_type_id? : string
|
|
8
9
|
readonly name : string
|
|
9
10
|
readonly federal_census_municipality_id : string
|
|
11
|
+
readonly geom : Geom
|
|
10
12
|
readonly [x : string] : any
|
|
11
13
|
|
|
12
14
|
constructor(municipality : any) {
|
|
@@ -18,6 +20,7 @@ export class Municipality {
|
|
|
18
20
|
this.municipality_type_id = municipality.municipality_type_id
|
|
19
21
|
this.name = municipality.name
|
|
20
22
|
this.federal_census_municipality_id = municipality.federal_census_municipality_id
|
|
23
|
+
this.geom = municipality.geom
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
static is(municipality : any) : municipality is Municipality {
|
|
@@ -27,27 +30,8 @@ export class Municipality {
|
|
|
27
30
|
is_state_id(municipality.state_id) &&
|
|
28
31
|
(municipality.municipality_type_id === undefined || typeof municipality.municipality_type_id === "string") &&
|
|
29
32
|
typeof municipality.name === "string" &&
|
|
30
|
-
typeof municipality.federal_census_municipality_id === "string"
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export class MunicipalityAux extends Municipality {
|
|
36
|
-
readonly federal_census_municipality : FederalCensusMunicipality
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
constructor(municipality : MunicipalityAux) {
|
|
40
|
-
if (!MunicipalityAux.is(municipality)) {
|
|
41
|
-
throw Error("Invalid input.")
|
|
42
|
-
}
|
|
43
|
-
super(municipality)
|
|
44
|
-
this.federal_census_municipality = municipality.federal_census_municipality
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
static is(municipality : any) : municipality is MunicipalityAux {
|
|
48
|
-
return (
|
|
49
|
-
Municipality.is(municipality) &&
|
|
50
|
-
FederalCensusMunicipality.is(municipality.federal_census_municipality)
|
|
33
|
+
typeof municipality.federal_census_municipality_id === "string" &&
|
|
34
|
+
Geom.is(municipality.geom)
|
|
51
35
|
)
|
|
52
36
|
}
|
|
53
37
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FederalCensusSchoolDistrict } from "../federal_census/FederalCensusSchoolDistrict"
|
|
2
|
+
import { Geom } from "./Geom"
|
|
2
3
|
import { is_state_id, StateID } from "./State"
|
|
3
4
|
|
|
4
5
|
export class SchoolDistrict {
|
|
@@ -6,6 +7,7 @@ export class SchoolDistrict {
|
|
|
6
7
|
readonly state_id : StateID
|
|
7
8
|
readonly name : string
|
|
8
9
|
readonly federal_census_school_district_id : string
|
|
10
|
+
readonly geom : Geom
|
|
9
11
|
readonly [x : string] : any
|
|
10
12
|
|
|
11
13
|
constructor(school_district : any) {
|
|
@@ -16,6 +18,7 @@ export class SchoolDistrict {
|
|
|
16
18
|
this.state_id = school_district.state_id
|
|
17
19
|
this.name = school_district.name
|
|
18
20
|
this.federal_census_school_district_id = school_district.federal_census_school_district_id
|
|
21
|
+
this.geom = school_district.geom
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
static is(school_district : any) : school_district is SchoolDistrict {
|
|
@@ -24,27 +27,8 @@ export class SchoolDistrict {
|
|
|
24
27
|
typeof school_district.school_district_id === "string" &&
|
|
25
28
|
is_state_id(school_district.state_id) &&
|
|
26
29
|
typeof school_district.name === "string" &&
|
|
27
|
-
typeof school_district.federal_census_school_district_id === "string"
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export class SchoolDistrictAux extends SchoolDistrict {
|
|
33
|
-
readonly federal_census_school_district : FederalCensusSchoolDistrict
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
constructor(school_district : SchoolDistrictAux) {
|
|
37
|
-
if (!SchoolDistrictAux.is(school_district)) {
|
|
38
|
-
throw Error("Invalid input.")
|
|
39
|
-
}
|
|
40
|
-
super(school_district)
|
|
41
|
-
this.federal_census_school_district = school_district.federal_census_school_district
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
static is(school_district : any) : school_district is SchoolDistrictAux {
|
|
45
|
-
return (
|
|
46
|
-
SchoolDistrict.is(school_district) &&
|
|
47
|
-
FederalCensusSchoolDistrict.is(school_district.federal_census_school_district)
|
|
30
|
+
typeof school_district.federal_census_school_district_id === "string" &&
|
|
31
|
+
Geom.is(school_district.geom)
|
|
48
32
|
)
|
|
49
33
|
}
|
|
50
34
|
}
|