triangle-types 1.0.264 → 1.0.266

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.
@@ -2,7 +2,10 @@ import { StateID } from "./State.js";
2
2
  export declare class County {
3
3
  readonly county_id: string;
4
4
  readonly state_id: StateID;
5
+ readonly county_type_id: string;
6
+ readonly function_type_id: string;
5
7
  readonly name: string;
8
+ readonly federal_census_county_id: string;
6
9
  constructor(county: any);
7
10
  static is(county: any): county is County;
8
11
  }
@@ -7,19 +7,28 @@ import { is_state_id } from "./State.js";
7
7
  export class County {
8
8
  county_id;
9
9
  state_id;
10
+ county_type_id;
11
+ function_type_id;
10
12
  name;
13
+ federal_census_county_id;
11
14
  constructor(county) {
12
15
  if (!County.is(county)) {
13
16
  throw Error("Invalid input.");
14
17
  }
15
18
  this.county_id = county.county_id;
16
19
  this.state_id = county.state_id;
20
+ this.county_type_id = county.county_type_id;
21
+ this.function_type_id = county.function_type_id;
17
22
  this.name = county.name;
23
+ this.federal_census_county_id = county.federal_census_county_id;
18
24
  }
19
25
  static is(county) {
20
26
  return (county !== undefined &&
21
27
  typeof county.county_id === "string" &&
22
28
  is_state_id(county.state_id) &&
23
- typeof county.name === "string");
29
+ typeof county.county_type_id === "string" &&
30
+ typeof county.function_type_id === "string" &&
31
+ typeof county.name === "string" &&
32
+ typeof county.federal_census_county_id === "string");
24
33
  }
25
34
  }
@@ -1,3 +1,4 @@
1
+ import { WebDocument } from "./WebDocument.js";
1
2
  declare const fragment_type_ids: readonly ["LINE", "CHAR"];
2
3
  export type FragmentTypeID = typeof fragment_type_ids[number];
3
4
  export declare function is_fragment_type_id(fragment_type_id: any): fragment_type_id is FragmentTypeID;
@@ -15,4 +16,9 @@ export declare class WebDocumentFragment {
15
16
  constructor(web_document_fragment: WebDocumentFragment);
16
17
  static is(web_document_fragment: any): web_document_fragment is WebDocumentFragment;
17
18
  }
19
+ export declare class WebDocumentFragmentAux extends WebDocumentFragment {
20
+ readonly web_document: WebDocument;
21
+ constructor(web_document_fragment: WebDocumentFragment);
22
+ static is(web_document_fragment: any): web_document_fragment is WebDocumentFragmentAux;
23
+ }
18
24
  export {};
@@ -1,3 +1,4 @@
1
+ import { WebDocument } from "./WebDocument.js";
1
2
  const fragment_type_ids = ["LINE", "CHAR"];
2
3
  export function is_fragment_type_id(fragment_type_id) {
3
4
  return fragment_type_ids.includes(fragment_type_id);
@@ -39,3 +40,17 @@ export class WebDocumentFragment {
39
40
  (web_document_fragment.vector === undefined || Array.isArray(web_document_fragment.vector) && web_document_fragment.vector.every((coordinate) => typeof coordinate === "number")));
40
41
  }
41
42
  }
43
+ export class WebDocumentFragmentAux extends WebDocumentFragment {
44
+ web_document;
45
+ constructor(web_document_fragment) {
46
+ if (!WebDocumentFragmentAux.is(web_document_fragment)) {
47
+ throw Error("Invalid input.");
48
+ }
49
+ super(web_document_fragment);
50
+ this.web_document = web_document_fragment.web_document;
51
+ }
52
+ static is(web_document_fragment) {
53
+ return (WebDocumentFragment.is(web_document_fragment) &&
54
+ WebDocument.is(web_document_fragment.web_document));
55
+ }
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.264",
3
+ "version": "1.0.266",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -11,7 +11,10 @@ import { is_state_id, StateID } from "./State"
11
11
  export class County {
12
12
  readonly county_id : string
13
13
  readonly state_id : StateID
14
+ readonly county_type_id : string
15
+ readonly function_type_id : string
14
16
  readonly name : string
17
+ readonly federal_census_county_id : string
15
18
 
16
19
  constructor(county : any) {
17
20
  if (!County.is(county)) {
@@ -19,7 +22,10 @@ export class County {
19
22
  }
20
23
  this.county_id = county.county_id
21
24
  this.state_id = county.state_id
25
+ this.county_type_id = county.county_type_id
26
+ this.function_type_id = county.function_type_id
22
27
  this.name = county.name
28
+ this.federal_census_county_id = county.federal_census_county_id
23
29
  }
24
30
 
25
31
  static is(county : any) : county is County {
@@ -27,7 +33,10 @@ export class County {
27
33
  county !== undefined &&
28
34
  typeof county.county_id === "string" &&
29
35
  is_state_id(county.state_id) &&
30
- typeof county.name === "string"
36
+ typeof county.county_type_id === "string" &&
37
+ typeof county.function_type_id === "string" &&
38
+ typeof county.name === "string" &&
39
+ typeof county.federal_census_county_id === "string"
31
40
  )
32
41
  }
33
42
  }
@@ -1,3 +1,5 @@
1
+ import { WebDocument } from "./WebDocument"
2
+
1
3
  const fragment_type_ids = ["LINE", "CHAR"] as const
2
4
 
3
5
  export type FragmentTypeID = typeof fragment_type_ids[number]
@@ -47,4 +49,24 @@ export class WebDocumentFragment {
47
49
  (web_document_fragment.vector === undefined || Array.isArray(web_document_fragment.vector) && web_document_fragment.vector.every((coordinate : any) => typeof coordinate === "number"))
48
50
  )
49
51
  }
52
+ }
53
+
54
+ export class WebDocumentFragmentAux extends WebDocumentFragment {
55
+ readonly web_document : WebDocument
56
+
57
+
58
+ constructor(web_document_fragment : WebDocumentFragment) {
59
+ if (!WebDocumentFragmentAux.is(web_document_fragment)) {
60
+ throw Error("Invalid input.")
61
+ }
62
+ super(web_document_fragment)
63
+ this.web_document = web_document_fragment.web_document
64
+ }
65
+
66
+ static is(web_document_fragment : any) : web_document_fragment is WebDocumentFragmentAux {
67
+ return (
68
+ WebDocumentFragment.is(web_document_fragment) &&
69
+ WebDocument.is(web_document_fragment.web_document)
70
+ )
71
+ }
50
72
  }