triangle-types 1.0.148 → 1.0.149
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 UserComment {
|
|
|
3
3
|
comment_id;
|
|
4
4
|
tenant_id;
|
|
5
5
|
voter_id;
|
|
6
|
+
text;
|
|
6
7
|
// readonly [x : string] : any
|
|
7
8
|
constructor(user_comment) {
|
|
8
9
|
if (!UserComment.is(user_comment)) {
|
|
@@ -12,12 +13,14 @@ export class UserComment {
|
|
|
12
13
|
this.comment_id = user_comment.comment_id;
|
|
13
14
|
this.tenant_id = user_comment.tenant_id;
|
|
14
15
|
this.voter_id = user_comment.voter_id;
|
|
16
|
+
this.text = user_comment.text;
|
|
15
17
|
}
|
|
16
18
|
static is(user_comment) {
|
|
17
19
|
return (user_comment !== undefined &&
|
|
18
20
|
typeof user_comment.user_id === "string" &&
|
|
19
21
|
typeof user_comment.comment_id === "string" &&
|
|
20
22
|
typeof user_comment.tenant_id === "string" &&
|
|
21
|
-
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string")
|
|
23
|
+
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string") &&
|
|
24
|
+
typeof user_comment.text === "string");
|
|
22
25
|
}
|
|
23
26
|
}
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ export class UserComment {
|
|
|
3
3
|
readonly comment_id : string
|
|
4
4
|
readonly tenant_id : string
|
|
5
5
|
readonly voter_id? : string
|
|
6
|
+
readonly text : string
|
|
6
7
|
// readonly [x : string] : any
|
|
7
8
|
|
|
8
9
|
constructor(user_comment : UserComment) {
|
|
@@ -13,6 +14,7 @@ export class UserComment {
|
|
|
13
14
|
this.comment_id = user_comment.comment_id
|
|
14
15
|
this.tenant_id = user_comment.tenant_id
|
|
15
16
|
this.voter_id = user_comment.voter_id
|
|
17
|
+
this.text = user_comment.text
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
static is(user_comment : any) : user_comment is UserComment {
|
|
@@ -21,7 +23,8 @@ export class UserComment {
|
|
|
21
23
|
typeof user_comment.user_id === "string" &&
|
|
22
24
|
typeof user_comment.comment_id === "string" &&
|
|
23
25
|
typeof user_comment.tenant_id === "string" &&
|
|
24
|
-
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string")
|
|
26
|
+
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string") &&
|
|
27
|
+
typeof user_comment.text === "string"
|
|
25
28
|
)
|
|
26
29
|
}
|
|
27
30
|
}
|