triangle-types 1.0.205 → 1.0.207
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,8 +5,8 @@ export declare class WebArticleTag {
|
|
|
5
5
|
readonly url: string;
|
|
6
6
|
readonly domain: string;
|
|
7
7
|
readonly date: string;
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
8
|
+
readonly is_relevant?: boolean;
|
|
9
|
+
readonly sentiment_id?: string;
|
|
10
10
|
readonly [x: string]: any;
|
|
11
11
|
constructor(web_article_tag: WebArticleTag);
|
|
12
12
|
static is(web_article_tag: any): web_article_tag is WebArticleTag;
|
|
@@ -5,8 +5,8 @@ export class WebArticleTag {
|
|
|
5
5
|
url;
|
|
6
6
|
domain;
|
|
7
7
|
date;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
is_relevant;
|
|
9
|
+
sentiment_id;
|
|
10
10
|
constructor(web_article_tag) {
|
|
11
11
|
if (!WebArticleTag.is(web_article_tag)) {
|
|
12
12
|
throw Error("Invalid input.");
|
|
@@ -16,8 +16,8 @@ export class WebArticleTag {
|
|
|
16
16
|
this.url = web_article_tag.url;
|
|
17
17
|
this.domain = web_article_tag.domain;
|
|
18
18
|
this.date = web_article_tag.date;
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
19
|
+
this.is_relevant = web_article_tag.is_relevant;
|
|
20
|
+
this.sentiment_id = web_article_tag.sentiment_id;
|
|
21
21
|
}
|
|
22
22
|
static is(web_article_tag) {
|
|
23
23
|
return (web_article_tag !== undefined &&
|
|
@@ -25,9 +25,9 @@ export class WebArticleTag {
|
|
|
25
25
|
typeof web_article_tag.tag_id === "string" &&
|
|
26
26
|
typeof web_article_tag.url === "string" &&
|
|
27
27
|
typeof web_article_tag.domain === "string" &&
|
|
28
|
-
web_article_tag.date === "string" &&
|
|
29
|
-
(web_article_tag.
|
|
30
|
-
(web_article_tag.
|
|
28
|
+
typeof web_article_tag.date === "string" &&
|
|
29
|
+
(web_article_tag.is_relevant === undefined || typeof web_article_tag.is_relevant === "boolean") &&
|
|
30
|
+
(web_article_tag.sentiment_id === undefined || typeof web_article_tag.sentiment_id === "string"));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
export class WebArticleTagAux extends WebArticleTag {
|
package/package.json
CHANGED
|
@@ -6,8 +6,8 @@ export class WebArticleTag {
|
|
|
6
6
|
readonly url : string
|
|
7
7
|
readonly domain : string
|
|
8
8
|
readonly date : string
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
9
|
+
readonly is_relevant? : boolean
|
|
10
|
+
readonly sentiment_id? : string
|
|
11
11
|
readonly [x : string] : any
|
|
12
12
|
|
|
13
13
|
constructor(web_article_tag : WebArticleTag) {
|
|
@@ -19,8 +19,8 @@ export class WebArticleTag {
|
|
|
19
19
|
this.url = web_article_tag.url
|
|
20
20
|
this.domain = web_article_tag.domain
|
|
21
21
|
this.date = web_article_tag.date
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
22
|
+
this.is_relevant = web_article_tag.is_relevant
|
|
23
|
+
this.sentiment_id = web_article_tag.sentiment_id
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
static is(web_article_tag : any) : web_article_tag is WebArticleTag {
|
|
@@ -30,9 +30,9 @@ export class WebArticleTag {
|
|
|
30
30
|
typeof web_article_tag.tag_id === "string" &&
|
|
31
31
|
typeof web_article_tag.url === "string" &&
|
|
32
32
|
typeof web_article_tag.domain === "string" &&
|
|
33
|
-
web_article_tag.date === "string" &&
|
|
34
|
-
(web_article_tag.
|
|
35
|
-
(web_article_tag.
|
|
33
|
+
typeof web_article_tag.date === "string" &&
|
|
34
|
+
(web_article_tag.is_relevant === undefined || typeof web_article_tag.is_relevant === "boolean") &&
|
|
35
|
+
(web_article_tag.sentiment_id === undefined || typeof web_article_tag.sentiment_id === "string")
|
|
36
36
|
)
|
|
37
37
|
}
|
|
38
38
|
}
|