triangle-types 1.0.76 → 1.0.77
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.
|
@@ -5,9 +5,22 @@ export declare class FederalCongressVote {
|
|
|
5
5
|
readonly chamber_id: string;
|
|
6
6
|
readonly number: number;
|
|
7
7
|
readonly time: string;
|
|
8
|
-
readonly
|
|
9
|
-
readonly vote_type_id?: string;
|
|
10
|
-
readonly outcome?: string;
|
|
8
|
+
readonly [x: string]: any;
|
|
11
9
|
constructor(federal_congress_vote: any);
|
|
12
10
|
static is(federal_congress_vote: any): federal_congress_vote is FederalCongressVote;
|
|
13
11
|
}
|
|
12
|
+
export declare class FederalCongressHouseVote extends FederalCongressVote {
|
|
13
|
+
readonly chamber_id: "H";
|
|
14
|
+
readonly question: string;
|
|
15
|
+
readonly vote_type_id: string;
|
|
16
|
+
readonly outcome: string;
|
|
17
|
+
constructor(federal_congress_vote: any);
|
|
18
|
+
static is(federal_congress_vote: any): federal_congress_vote is FederalCongressHouseVote;
|
|
19
|
+
}
|
|
20
|
+
export declare class FederalCongressSenateVote extends FederalCongressVote {
|
|
21
|
+
readonly chamber_id: "S";
|
|
22
|
+
readonly question: string;
|
|
23
|
+
readonly outcome: string;
|
|
24
|
+
constructor(federal_congress_vote: any);
|
|
25
|
+
static is(federal_congress_vote: any): federal_congress_vote is FederalCongressSenateVote;
|
|
26
|
+
}
|
|
@@ -5,9 +5,6 @@ export class FederalCongressVote {
|
|
|
5
5
|
chamber_id;
|
|
6
6
|
number;
|
|
7
7
|
time;
|
|
8
|
-
question;
|
|
9
|
-
vote_type_id;
|
|
10
|
-
outcome;
|
|
11
8
|
constructor(federal_congress_vote) {
|
|
12
9
|
if (!FederalCongressVote.is(federal_congress_vote)) {
|
|
13
10
|
throw Error("Invalid input.");
|
|
@@ -18,9 +15,6 @@ export class FederalCongressVote {
|
|
|
18
15
|
this.chamber_id = federal_congress_vote.chamber_id;
|
|
19
16
|
this.number = federal_congress_vote.number;
|
|
20
17
|
this.time = federal_congress_vote.time;
|
|
21
|
-
this.question = federal_congress_vote.question;
|
|
22
|
-
this.vote_type_id = federal_congress_vote.vote_type_id;
|
|
23
|
-
this.outcome = federal_congress_vote.outcome;
|
|
24
18
|
}
|
|
25
19
|
static is(federal_congress_vote) {
|
|
26
20
|
return (federal_congress_vote !== undefined &&
|
|
@@ -29,9 +23,49 @@ export class FederalCongressVote {
|
|
|
29
23
|
typeof federal_congress_vote.session_id === "number" &&
|
|
30
24
|
typeof federal_congress_vote.chamber_id === "string" &&
|
|
31
25
|
typeof federal_congress_vote.number === "number" &&
|
|
32
|
-
typeof federal_congress_vote.time === "string"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
typeof federal_congress_vote.time === "string");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class FederalCongressHouseVote extends FederalCongressVote {
|
|
30
|
+
chamber_id;
|
|
31
|
+
question;
|
|
32
|
+
vote_type_id;
|
|
33
|
+
outcome;
|
|
34
|
+
constructor(federal_congress_vote) {
|
|
35
|
+
if (!FederalCongressHouseVote.is(federal_congress_vote)) {
|
|
36
|
+
throw Error("Invalid input.");
|
|
37
|
+
}
|
|
38
|
+
super(federal_congress_vote);
|
|
39
|
+
this.chamber_id = federal_congress_vote.chamber_id;
|
|
40
|
+
this.question = federal_congress_vote.question;
|
|
41
|
+
this.vote_type_id = federal_congress_vote.vote_type_id;
|
|
42
|
+
this.outcome = federal_congress_vote.outcome;
|
|
43
|
+
}
|
|
44
|
+
static is(federal_congress_vote) {
|
|
45
|
+
return (federal_congress_vote !== undefined &&
|
|
46
|
+
federal_congress_vote.chamber_id === "H" &&
|
|
47
|
+
typeof federal_congress_vote.question === "string" &&
|
|
48
|
+
typeof federal_congress_vote.vote_type_id === "string" &&
|
|
49
|
+
typeof federal_congress_vote.outcome === "string");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class FederalCongressSenateVote extends FederalCongressVote {
|
|
53
|
+
chamber_id;
|
|
54
|
+
question;
|
|
55
|
+
outcome;
|
|
56
|
+
constructor(federal_congress_vote) {
|
|
57
|
+
if (!FederalCongressSenateVote.is(federal_congress_vote)) {
|
|
58
|
+
throw Error("Invalid input.");
|
|
59
|
+
}
|
|
60
|
+
super(federal_congress_vote);
|
|
61
|
+
this.chamber_id = federal_congress_vote.chamber_id;
|
|
62
|
+
this.question = federal_congress_vote.question;
|
|
63
|
+
this.outcome = federal_congress_vote.outcome;
|
|
64
|
+
}
|
|
65
|
+
static is(federal_congress_vote) {
|
|
66
|
+
return (federal_congress_vote !== undefined &&
|
|
67
|
+
federal_congress_vote.chamber_id === "S" &&
|
|
68
|
+
typeof federal_congress_vote.question === "string" &&
|
|
69
|
+
typeof federal_congress_vote.outcome === "string");
|
|
36
70
|
}
|
|
37
71
|
}
|
package/package.json
CHANGED
|
@@ -5,9 +5,7 @@ export class FederalCongressVote {
|
|
|
5
5
|
readonly chamber_id : string
|
|
6
6
|
readonly number : number
|
|
7
7
|
readonly time : string
|
|
8
|
-
readonly
|
|
9
|
-
readonly vote_type_id? : string
|
|
10
|
-
readonly outcome? : string
|
|
8
|
+
readonly [x : string] : any
|
|
11
9
|
|
|
12
10
|
constructor(federal_congress_vote : any) {
|
|
13
11
|
if (!FederalCongressVote.is(federal_congress_vote)) {
|
|
@@ -19,9 +17,6 @@ export class FederalCongressVote {
|
|
|
19
17
|
this.chamber_id = federal_congress_vote.chamber_id
|
|
20
18
|
this.number = federal_congress_vote.number
|
|
21
19
|
this.time = federal_congress_vote.time
|
|
22
|
-
this.question = federal_congress_vote.question
|
|
23
|
-
this.vote_type_id = federal_congress_vote.vote_type_id
|
|
24
|
-
this.outcome = federal_congress_vote.outcome
|
|
25
20
|
}
|
|
26
21
|
|
|
27
22
|
static is(federal_congress_vote : any) : federal_congress_vote is FederalCongressVote {
|
|
@@ -32,11 +27,61 @@ export class FederalCongressVote {
|
|
|
32
27
|
typeof federal_congress_vote.session_id === "number" &&
|
|
33
28
|
typeof federal_congress_vote.chamber_id === "string" &&
|
|
34
29
|
typeof federal_congress_vote.number === "number" &&
|
|
35
|
-
typeof federal_congress_vote.time === "string"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
typeof federal_congress_vote.time === "string"
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class FederalCongressHouseVote extends FederalCongressVote {
|
|
37
|
+
readonly chamber_id : "H"
|
|
38
|
+
readonly question : string
|
|
39
|
+
readonly vote_type_id : string
|
|
40
|
+
readonly outcome : string
|
|
41
|
+
|
|
42
|
+
constructor(federal_congress_vote : any) {
|
|
43
|
+
if (!FederalCongressHouseVote.is(federal_congress_vote)) {
|
|
44
|
+
throw Error("Invalid input.")
|
|
45
|
+
}
|
|
46
|
+
super(federal_congress_vote)
|
|
47
|
+
this.chamber_id = federal_congress_vote.chamber_id
|
|
48
|
+
this.question = federal_congress_vote.question
|
|
49
|
+
this.vote_type_id = federal_congress_vote.vote_type_id
|
|
50
|
+
this.outcome = federal_congress_vote.outcome
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static is(federal_congress_vote : any) : federal_congress_vote is FederalCongressHouseVote {
|
|
54
|
+
return (
|
|
55
|
+
federal_congress_vote !== undefined &&
|
|
56
|
+
federal_congress_vote.chamber_id === "H" &&
|
|
57
|
+
typeof federal_congress_vote.question === "string" &&
|
|
58
|
+
typeof federal_congress_vote.vote_type_id === "string" &&
|
|
59
|
+
typeof federal_congress_vote.outcome === "string"
|
|
39
60
|
)
|
|
40
61
|
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export class FederalCongressSenateVote extends FederalCongressVote {
|
|
65
|
+
readonly chamber_id : "S"
|
|
66
|
+
readonly question : string
|
|
67
|
+
readonly outcome : string
|
|
68
|
+
|
|
69
|
+
constructor(federal_congress_vote : any) {
|
|
70
|
+
if (!FederalCongressSenateVote.is(federal_congress_vote)) {
|
|
71
|
+
throw Error("Invalid input.")
|
|
72
|
+
}
|
|
73
|
+
super(federal_congress_vote)
|
|
74
|
+
this.chamber_id = federal_congress_vote.chamber_id
|
|
75
|
+
this.question = federal_congress_vote.question
|
|
76
|
+
this.outcome = federal_congress_vote.outcome
|
|
77
|
+
}
|
|
41
78
|
|
|
79
|
+
static is(federal_congress_vote : any) : federal_congress_vote is FederalCongressSenateVote {
|
|
80
|
+
return (
|
|
81
|
+
federal_congress_vote !== undefined &&
|
|
82
|
+
federal_congress_vote.chamber_id === "S" &&
|
|
83
|
+
typeof federal_congress_vote.question === "string" &&
|
|
84
|
+
typeof federal_congress_vote.outcome === "string"
|
|
85
|
+
)
|
|
86
|
+
}
|
|
42
87
|
}
|