elections-types 1.0.46 → 1.0.48
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.
- package/dist/src/types/Article.d.ts +1 -1
- package/dist/src/types/Article.js +3 -3
- package/dist/src/types/CandidateArticle.d.ts +1 -1
- package/dist/src/types/CandidateArticle.js +3 -3
- package/dist/src/types/ElectionsConfig.d.ts +1 -0
- package/package.json +1 -1
- package/src/types/Article.ts +3 -3
- package/src/types/CandidateArticle.ts +3 -3
- package/src/types/ElectionsConfig.ts +1 -0
|
@@ -7,7 +7,7 @@ export declare class Article {
|
|
|
7
7
|
readonly domain: string;
|
|
8
8
|
readonly url: string;
|
|
9
9
|
readonly fetch_time: string;
|
|
10
|
-
readonly
|
|
10
|
+
readonly relevance?: string;
|
|
11
11
|
readonly text_status?: string;
|
|
12
12
|
constructor(article: any);
|
|
13
13
|
static is(article: any): article is Article;
|
|
@@ -7,7 +7,7 @@ export class Article {
|
|
|
7
7
|
domain;
|
|
8
8
|
url;
|
|
9
9
|
fetch_time;
|
|
10
|
-
|
|
10
|
+
relevance;
|
|
11
11
|
text_status;
|
|
12
12
|
constructor(article) {
|
|
13
13
|
if (!Article.is(article)) {
|
|
@@ -21,7 +21,7 @@ export class Article {
|
|
|
21
21
|
this.domain = article.domain;
|
|
22
22
|
this.url = article.url;
|
|
23
23
|
this.fetch_time = article.fetch_time;
|
|
24
|
-
this.
|
|
24
|
+
this.relevance = article.relevance;
|
|
25
25
|
this.text_status = article.text_status;
|
|
26
26
|
}
|
|
27
27
|
static is(article) {
|
|
@@ -34,7 +34,7 @@ export class Article {
|
|
|
34
34
|
typeof article.domain === "string" &&
|
|
35
35
|
typeof article.url === "string" &&
|
|
36
36
|
typeof article.fetch_time === "string" &&
|
|
37
|
-
(article.
|
|
37
|
+
(article.relevance === undefined || typeof article.relevance === "string") &&
|
|
38
38
|
(article.text_status === undefined || typeof article.text_status === "string"));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -4,7 +4,7 @@ export declare class CandidateArticle {
|
|
|
4
4
|
readonly article_id: string;
|
|
5
5
|
readonly url: string;
|
|
6
6
|
readonly fetch_time: string;
|
|
7
|
-
readonly
|
|
7
|
+
readonly relevance?: string;
|
|
8
8
|
readonly sentiment?: string;
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
constructor(candidate_article: any);
|
|
@@ -4,7 +4,7 @@ export class CandidateArticle {
|
|
|
4
4
|
article_id;
|
|
5
5
|
url;
|
|
6
6
|
fetch_time;
|
|
7
|
-
|
|
7
|
+
relevance;
|
|
8
8
|
sentiment;
|
|
9
9
|
constructor(candidate_article) {
|
|
10
10
|
if (!CandidateArticle.is(candidate_article)) {
|
|
@@ -14,7 +14,7 @@ export class CandidateArticle {
|
|
|
14
14
|
this.article_id = candidate_article.article_id;
|
|
15
15
|
this.url = candidate_article.url;
|
|
16
16
|
this.fetch_time = candidate_article.fetch_time;
|
|
17
|
-
this.
|
|
17
|
+
this.relevance = candidate_article.relevance;
|
|
18
18
|
this.sentiment = candidate_article.sentiment;
|
|
19
19
|
}
|
|
20
20
|
static is(candidate_article) {
|
|
@@ -23,7 +23,7 @@ export class CandidateArticle {
|
|
|
23
23
|
typeof candidate_article.article_id === "string" &&
|
|
24
24
|
typeof candidate_article.url === "string" &&
|
|
25
25
|
typeof candidate_article.fetch_time === "string" &&
|
|
26
|
-
(candidate_article.
|
|
26
|
+
(candidate_article.relevance === undefined || typeof candidate_article.relevance === "string") &&
|
|
27
27
|
(candidate_article.sentiment === undefined || typeof candidate_article.sentiment === "string"));
|
|
28
28
|
}
|
|
29
29
|
}
|
package/package.json
CHANGED
package/src/types/Article.ts
CHANGED
|
@@ -7,7 +7,7 @@ export class Article {
|
|
|
7
7
|
readonly domain : string
|
|
8
8
|
readonly url : string
|
|
9
9
|
readonly fetch_time : string
|
|
10
|
-
readonly
|
|
10
|
+
readonly relevance? : string
|
|
11
11
|
readonly text_status? : string
|
|
12
12
|
|
|
13
13
|
constructor(article : any) {
|
|
@@ -22,7 +22,7 @@ export class Article {
|
|
|
22
22
|
this.domain = article.domain
|
|
23
23
|
this.url = article.url
|
|
24
24
|
this.fetch_time = article.fetch_time
|
|
25
|
-
this.
|
|
25
|
+
this.relevance = article.relevance
|
|
26
26
|
this.text_status = article.text_status
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -37,7 +37,7 @@ export class Article {
|
|
|
37
37
|
typeof article.domain === "string" &&
|
|
38
38
|
typeof article.url === "string" &&
|
|
39
39
|
typeof article.fetch_time === "string" &&
|
|
40
|
-
(article.
|
|
40
|
+
(article.relevance === undefined || typeof article.relevance === "string") &&
|
|
41
41
|
(article.text_status === undefined || typeof article.text_status === "string")
|
|
42
42
|
)
|
|
43
43
|
}
|
|
@@ -5,7 +5,7 @@ export class CandidateArticle {
|
|
|
5
5
|
readonly article_id : string
|
|
6
6
|
readonly url : string
|
|
7
7
|
readonly fetch_time : string
|
|
8
|
-
readonly
|
|
8
|
+
readonly relevance? : string
|
|
9
9
|
readonly sentiment? : string
|
|
10
10
|
[x : string] : any
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ export class CandidateArticle {
|
|
|
17
17
|
this.article_id = candidate_article.article_id
|
|
18
18
|
this.url = candidate_article.url
|
|
19
19
|
this.fetch_time = candidate_article.fetch_time
|
|
20
|
-
this.
|
|
20
|
+
this.relevance = candidate_article.relevance
|
|
21
21
|
this.sentiment = candidate_article.sentiment
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -28,7 +28,7 @@ export class CandidateArticle {
|
|
|
28
28
|
typeof candidate_article.article_id === "string" &&
|
|
29
29
|
typeof candidate_article.url === "string" &&
|
|
30
30
|
typeof candidate_article.fetch_time === "string" &&
|
|
31
|
-
(candidate_article.
|
|
31
|
+
(candidate_article.relevance === undefined || typeof candidate_article.relevance === "string") &&
|
|
32
32
|
(candidate_article.sentiment === undefined || typeof candidate_article.sentiment === "string")
|
|
33
33
|
)
|
|
34
34
|
}
|