triangle-types 1.0.57 → 1.0.58
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/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/src/types/prism/PrismVoter.ts +0 -29
package/dist/src/index.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ export * from "./types/prism/Prism.js";
|
|
|
48
48
|
export * from "./types/prism/PrismMetric.js";
|
|
49
49
|
export * from "./types/prism/PrismSubPrism.js";
|
|
50
50
|
export * from "./types/prism/PrismTarget.js";
|
|
51
|
-
export * from "./types/prism/PrismVoter.js";
|
|
52
51
|
export * from "./types/prism/UserPrism.js";
|
|
53
52
|
export * from "./types/prism/Voter.js";
|
|
54
53
|
export * from "./types/prism/VoterTarget.js";
|
package/dist/src/index.js
CHANGED
|
@@ -48,7 +48,6 @@ export * from "./types/prism/Prism.js";
|
|
|
48
48
|
export * from "./types/prism/PrismMetric.js";
|
|
49
49
|
export * from "./types/prism/PrismSubPrism.js";
|
|
50
50
|
export * from "./types/prism/PrismTarget.js";
|
|
51
|
-
export * from "./types/prism/PrismVoter.js";
|
|
52
51
|
export * from "./types/prism/UserPrism.js";
|
|
53
52
|
export * from "./types/prism/Voter.js";
|
|
54
53
|
export * from "./types/prism/VoterTarget.js";
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -58,7 +58,6 @@ export * from "./types/prism/Prism"
|
|
|
58
58
|
export * from "./types/prism/PrismMetric"
|
|
59
59
|
export * from "./types/prism/PrismSubPrism"
|
|
60
60
|
export * from "./types/prism/PrismTarget"
|
|
61
|
-
export * from "./types/prism/PrismVoter"
|
|
62
61
|
export * from "./types/prism/UserPrism"
|
|
63
62
|
export * from "./types/prism/Voter"
|
|
64
63
|
export * from "./types/prism/VoterTarget"
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export class PrismVoter {
|
|
2
|
-
readonly prism_voter_id : string
|
|
3
|
-
readonly prism_id : string
|
|
4
|
-
readonly voter_id : string
|
|
5
|
-
readonly state_id : string
|
|
6
|
-
readonly value : number
|
|
7
|
-
|
|
8
|
-
constructor(prism_voter : any) {
|
|
9
|
-
if (!PrismVoter.is(prism_voter)) {
|
|
10
|
-
throw Error("Invalid input.")
|
|
11
|
-
}
|
|
12
|
-
this.prism_voter_id = prism_voter.prism_voter_id
|
|
13
|
-
this.prism_id = prism_voter.prism_id
|
|
14
|
-
this.voter_id = prism_voter.voter_id
|
|
15
|
-
this.state_id = prism_voter.state_id
|
|
16
|
-
this.value = prism_voter.value
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static is(prism_voter : any) : prism_voter is PrismVoter {
|
|
20
|
-
return (
|
|
21
|
-
prism_voter !== undefined &&
|
|
22
|
-
typeof prism_voter.prism_voter_id === "string" &&
|
|
23
|
-
typeof prism_voter.prism_id === "string" &&
|
|
24
|
-
typeof prism_voter.voter_id === "string" &&
|
|
25
|
-
typeof prism_voter.state_id === "string" &&
|
|
26
|
-
typeof prism_voter.value === "number"
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
}
|