triangle-types 1.0.62 → 1.0.63
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,6 +5,7 @@ export declare class PrismSegment {
|
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly min_value: number;
|
|
7
7
|
readonly max_value: number;
|
|
8
|
+
readonly num_voters: number;
|
|
8
9
|
readonly [x: string]: any;
|
|
9
10
|
constructor(prism_segment: any);
|
|
10
11
|
static is(prism_segment: any): prism_segment is PrismSegment;
|
|
@@ -5,6 +5,7 @@ export class PrismSegment {
|
|
|
5
5
|
name;
|
|
6
6
|
min_value;
|
|
7
7
|
max_value;
|
|
8
|
+
num_voters;
|
|
8
9
|
constructor(prism_segment) {
|
|
9
10
|
if (!PrismSegment.is(prism_segment)) {
|
|
10
11
|
throw Error("Invalid input.");
|
|
@@ -15,6 +16,7 @@ export class PrismSegment {
|
|
|
15
16
|
this.name = prism_segment.name;
|
|
16
17
|
this.min_value = prism_segment.min_value;
|
|
17
18
|
this.max_value = prism_segment.max_value;
|
|
19
|
+
this.num_voters = prism_segment.num_voters;
|
|
18
20
|
}
|
|
19
21
|
static is(prism_segment) {
|
|
20
22
|
return (prism_segment !== undefined &&
|
|
@@ -23,7 +25,8 @@ export class PrismSegment {
|
|
|
23
25
|
typeof prism_segment.segment_id === "string" &&
|
|
24
26
|
typeof prism_segment.name === "string" &&
|
|
25
27
|
typeof prism_segment.min_value === "number" &&
|
|
26
|
-
typeof prism_segment.max_value === "number"
|
|
28
|
+
typeof prism_segment.max_value === "number" &&
|
|
29
|
+
typeof prism_segment.num_voters === "number");
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
export class PrismFeatureSegment extends PrismSegment {
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ export class PrismSegment {
|
|
|
5
5
|
readonly name : string
|
|
6
6
|
readonly min_value : number
|
|
7
7
|
readonly max_value : number
|
|
8
|
+
readonly num_voters : number
|
|
8
9
|
readonly [x : string] : any
|
|
9
10
|
|
|
10
11
|
constructor(prism_segment : any) {
|
|
@@ -17,6 +18,7 @@ export class PrismSegment {
|
|
|
17
18
|
this.name = prism_segment.name
|
|
18
19
|
this.min_value = prism_segment.min_value
|
|
19
20
|
this.max_value = prism_segment.max_value
|
|
21
|
+
this.num_voters = prism_segment.num_voters
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
static is(prism_segment : any) : prism_segment is PrismSegment {
|
|
@@ -27,7 +29,8 @@ export class PrismSegment {
|
|
|
27
29
|
typeof prism_segment.segment_id === "string" &&
|
|
28
30
|
typeof prism_segment.name === "string" &&
|
|
29
31
|
typeof prism_segment.min_value === "number" &&
|
|
30
|
-
typeof prism_segment.max_value === "number"
|
|
32
|
+
typeof prism_segment.max_value === "number" &&
|
|
33
|
+
typeof prism_segment.num_voters === "number"
|
|
31
34
|
)
|
|
32
35
|
}
|
|
33
36
|
}
|