triage-types 1.0.72 → 1.0.73

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.
@@ -16,6 +16,7 @@ export * from "./types/state_permits/AR/ARStatePermitSource.js";
16
16
  export * from "./types/state_permits/AR/ARStatePermitSourcePollutant.js";
17
17
  export * from "./types/state_permits/KY/KYStateFacility.js";
18
18
  export * from "./types/state_permits/KY/KYStatePermit.js";
19
+ export * from "./types/state_permits/KY/KYStatePermitDocument.js";
19
20
  export * from "./types/state_permits/KY/KYStatePermitSource.js";
20
21
  export * from "./types/state_permits/KY/KYStatePermitSourcePollutant.js";
21
22
  export * from "./types/state_permits/NC/NCStateFacility.js";
package/dist/src/index.js CHANGED
@@ -16,6 +16,7 @@ export * from "./types/state_permits/AR/ARStatePermitSource.js";
16
16
  export * from "./types/state_permits/AR/ARStatePermitSourcePollutant.js";
17
17
  export * from "./types/state_permits/KY/KYStateFacility.js";
18
18
  export * from "./types/state_permits/KY/KYStatePermit.js";
19
+ export * from "./types/state_permits/KY/KYStatePermitDocument.js";
19
20
  export * from "./types/state_permits/KY/KYStatePermitSource.js";
20
21
  export * from "./types/state_permits/KY/KYStatePermitSourcePollutant.js";
21
22
  export * from "./types/state_permits/NC/NCStateFacility.js";
@@ -0,0 +1,9 @@
1
+ import { StatePermitDocument } from "../StatePermitDocument.js";
2
+ export declare class KYStatePermitDocument extends StatePermitDocument {
3
+ readonly state_id: "KY";
4
+ readonly type: string;
5
+ readonly date?: string;
6
+ readonly [x: string]: any;
7
+ constructor(state_permit: KYStatePermitDocument);
8
+ static is(state_permit: any): state_permit is KYStatePermitDocument;
9
+ }
@@ -0,0 +1,21 @@
1
+ import { StatePermitDocument } from "../StatePermitDocument.js";
2
+ export class KYStatePermitDocument extends StatePermitDocument {
3
+ state_id;
4
+ type;
5
+ date;
6
+ constructor(state_permit) {
7
+ if (!KYStatePermitDocument.is(state_permit)) {
8
+ throw Error("Invalid input.");
9
+ }
10
+ super(state_permit);
11
+ this.state_id = state_permit.state_id;
12
+ this.type = state_permit.type;
13
+ this.date = state_permit.date;
14
+ }
15
+ static is(state_permit) {
16
+ return (StatePermitDocument.is(state_permit) &&
17
+ state_permit.state_id === "KY" &&
18
+ typeof state_permit.type === "string" &&
19
+ (state_permit.date === undefined || typeof state_permit.date === "string"));
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triage-types",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ export * from "./types/state_permits/AR/ARStatePermitSourcePollutant"
20
20
 
21
21
  export * from "./types/state_permits/KY/KYStateFacility"
22
22
  export * from "./types/state_permits/KY/KYStatePermit"
23
+ export * from "./types/state_permits/KY/KYStatePermitDocument"
23
24
  export * from "./types/state_permits/KY/KYStatePermitSource"
24
25
  export * from "./types/state_permits/KY/KYStatePermitSourcePollutant"
25
26
 
@@ -0,0 +1,28 @@
1
+ import { is_state_id, StateID } from "../../State"
2
+ import { StatePermitDocument } from "../StatePermitDocument"
3
+
4
+ export class KYStatePermitDocument extends StatePermitDocument {
5
+ readonly state_id : "KY"
6
+ readonly type : string
7
+ readonly date? : string
8
+ readonly [x : string] : any
9
+
10
+ constructor(state_permit : KYStatePermitDocument) {
11
+ if (!KYStatePermitDocument.is(state_permit)) {
12
+ throw Error("Invalid input.")
13
+ }
14
+ super(state_permit)
15
+ this.state_id = state_permit.state_id
16
+ this.type = state_permit.type
17
+ this.date = state_permit.date
18
+ }
19
+
20
+ static is(state_permit : any) : state_permit is KYStatePermitDocument {
21
+ return (
22
+ StatePermitDocument.is(state_permit) &&
23
+ state_permit.state_id === "KY" &&
24
+ typeof state_permit.type === "string" &&
25
+ (state_permit.date === undefined || typeof state_permit.date === "string")
26
+ )
27
+ }
28
+ }