elections-types 1.1.23 → 1.1.24
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.
|
@@ -4,6 +4,7 @@ export declare class PressArticleTag {
|
|
|
4
4
|
readonly tag_id: string;
|
|
5
5
|
readonly publish_date: string;
|
|
6
6
|
readonly relevance?: string;
|
|
7
|
+
readonly sentiment?: string;
|
|
7
8
|
readonly [x: string]: any;
|
|
8
9
|
constructor(press_article_tag: PressArticleTag);
|
|
9
10
|
static is(press_article_tag: any): press_article_tag is PressArticleTag;
|
|
@@ -4,6 +4,7 @@ export class PressArticleTag {
|
|
|
4
4
|
tag_id;
|
|
5
5
|
publish_date;
|
|
6
6
|
relevance;
|
|
7
|
+
sentiment;
|
|
7
8
|
constructor(press_article_tag) {
|
|
8
9
|
if (!PressArticleTag.is(press_article_tag)) {
|
|
9
10
|
throw Error("Invalid input.");
|
|
@@ -12,13 +13,15 @@ export class PressArticleTag {
|
|
|
12
13
|
this.tag_id = press_article_tag.tag_id;
|
|
13
14
|
this.publish_date = press_article_tag.publish_date;
|
|
14
15
|
this.relevance = press_article_tag.relevance;
|
|
16
|
+
this.sentiment = press_article_tag.sentiment;
|
|
15
17
|
}
|
|
16
18
|
static is(press_article_tag) {
|
|
17
19
|
return (press_article_tag !== undefined &&
|
|
18
20
|
typeof press_article_tag.press_article_id === "string" &&
|
|
19
21
|
typeof press_article_tag.tag_id === "string" &&
|
|
20
22
|
typeof press_article_tag.publish_date === "string" &&
|
|
21
|
-
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string")
|
|
23
|
+
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string") &&
|
|
24
|
+
(press_article_tag.sentiment === undefined || typeof press_article_tag.sentiment === "string"));
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
export class PressArticleTagAux extends PressArticleTag {
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ export class PressArticleTag {
|
|
|
5
5
|
readonly tag_id : string
|
|
6
6
|
readonly publish_date : string
|
|
7
7
|
readonly relevance? : string
|
|
8
|
+
readonly sentiment? : string
|
|
8
9
|
readonly [x : string] : any
|
|
9
10
|
|
|
10
11
|
constructor(press_article_tag : PressArticleTag) {
|
|
@@ -15,6 +16,7 @@ export class PressArticleTag {
|
|
|
15
16
|
this.tag_id = press_article_tag.tag_id
|
|
16
17
|
this.publish_date = press_article_tag.publish_date
|
|
17
18
|
this.relevance = press_article_tag.relevance
|
|
19
|
+
this.sentiment = press_article_tag.sentiment
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
static is(press_article_tag : any) : press_article_tag is PressArticleTag {
|
|
@@ -23,7 +25,8 @@ export class PressArticleTag {
|
|
|
23
25
|
typeof press_article_tag.press_article_id === "string" &&
|
|
24
26
|
typeof press_article_tag.tag_id === "string" &&
|
|
25
27
|
typeof press_article_tag.publish_date === "string" &&
|
|
26
|
-
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string")
|
|
28
|
+
(press_article_tag.relevance === undefined || typeof press_article_tag.relevance === "string") &&
|
|
29
|
+
(press_article_tag.sentiment === undefined || typeof press_article_tag.sentiment === "string")
|
|
27
30
|
)
|
|
28
31
|
}
|
|
29
32
|
}
|