triangle-types 1.0.31 → 1.0.33
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.
|
@@ -3,6 +3,7 @@ export class Fragment {
|
|
|
3
3
|
max_size;
|
|
4
4
|
min_index;
|
|
5
5
|
max_index;
|
|
6
|
+
title;
|
|
6
7
|
text;
|
|
7
8
|
constructor(fragment) {
|
|
8
9
|
if (!Fragment.is(fragment)) {
|
|
@@ -12,14 +13,16 @@ export class Fragment {
|
|
|
12
13
|
this.max_size = fragment.max_size;
|
|
13
14
|
this.min_index = fragment.min_index;
|
|
14
15
|
this.max_index = fragment.max_index;
|
|
16
|
+
this.title = fragment.title;
|
|
15
17
|
this.text = fragment.text;
|
|
16
18
|
}
|
|
17
19
|
static is(fragment) {
|
|
18
20
|
return (fragment !== undefined &&
|
|
19
21
|
typeof fragment.fragment_id === "string" &&
|
|
20
|
-
typeof fragment.
|
|
22
|
+
typeof fragment.max_size === "number" &&
|
|
21
23
|
typeof fragment.min_index === "number" &&
|
|
22
24
|
typeof fragment.max_index === "number" &&
|
|
25
|
+
typeof fragment.title === "number" &&
|
|
23
26
|
typeof fragment.text === "string");
|
|
24
27
|
}
|
|
25
28
|
}
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ export class Fragment {
|
|
|
3
3
|
readonly max_size : number
|
|
4
4
|
readonly min_index : number
|
|
5
5
|
readonly max_index : number
|
|
6
|
+
readonly title : string
|
|
6
7
|
readonly text : string
|
|
7
8
|
readonly [x : string] : any
|
|
8
9
|
|
|
@@ -14,6 +15,7 @@ export class Fragment {
|
|
|
14
15
|
this.max_size = fragment.max_size
|
|
15
16
|
this.min_index = fragment.min_index
|
|
16
17
|
this.max_index = fragment.max_index
|
|
18
|
+
this.title = fragment.title
|
|
17
19
|
this.text = fragment.text
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -21,9 +23,10 @@ export class Fragment {
|
|
|
21
23
|
return (
|
|
22
24
|
fragment !== undefined &&
|
|
23
25
|
typeof fragment.fragment_id === "string" &&
|
|
24
|
-
typeof fragment.
|
|
26
|
+
typeof fragment.max_size === "number" &&
|
|
25
27
|
typeof fragment.min_index === "number" &&
|
|
26
28
|
typeof fragment.max_index === "number" &&
|
|
29
|
+
typeof fragment.title === "number" &&
|
|
27
30
|
typeof fragment.text === "string"
|
|
28
31
|
)
|
|
29
32
|
}
|