triangle-types 1.0.127 → 1.0.129
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export declare class WWWArticle {
|
|
2
2
|
readonly www_article_id: string;
|
|
3
3
|
readonly url: string;
|
|
4
|
-
readonly title
|
|
4
|
+
readonly title?: string;
|
|
5
5
|
readonly date?: string;
|
|
6
6
|
readonly relevance?: string;
|
|
7
|
-
readonly
|
|
7
|
+
readonly s3_id_html?: string;
|
|
8
|
+
readonly s3_id_txt?: string;
|
|
8
9
|
constructor(www_article: WWWArticle);
|
|
9
10
|
static is(www_article: any): www_article is WWWArticle;
|
|
10
11
|
}
|
|
@@ -4,7 +4,8 @@ export class WWWArticle {
|
|
|
4
4
|
title;
|
|
5
5
|
date;
|
|
6
6
|
relevance;
|
|
7
|
-
|
|
7
|
+
s3_id_html;
|
|
8
|
+
s3_id_txt;
|
|
8
9
|
constructor(www_article) {
|
|
9
10
|
if (!WWWArticle.is(www_article)) {
|
|
10
11
|
throw Error("Invalid input.");
|
|
@@ -14,15 +15,17 @@ export class WWWArticle {
|
|
|
14
15
|
this.title = www_article.title;
|
|
15
16
|
this.date = www_article.date;
|
|
16
17
|
this.relevance = www_article.relevance;
|
|
17
|
-
this.
|
|
18
|
+
this.s3_id_html = www_article.s3_id_html;
|
|
19
|
+
this.s3_id_txt = www_article.s3_id_txt;
|
|
18
20
|
}
|
|
19
21
|
static is(www_article) {
|
|
20
22
|
return (www_article !== undefined &&
|
|
21
23
|
typeof www_article.www_article_id === "string" &&
|
|
22
24
|
typeof www_article.url === "string" &&
|
|
23
|
-
typeof www_article.title === "string" &&
|
|
25
|
+
(www_article.title === undefined || typeof www_article.title === "string") &&
|
|
24
26
|
(www_article.date === undefined || typeof www_article.date === "string") &&
|
|
25
27
|
(www_article.relevance === undefined || typeof www_article.relevance === "string") &&
|
|
26
|
-
(www_article.
|
|
28
|
+
(www_article.s3_id_html === undefined || typeof www_article.s3_id_html === "string") &&
|
|
29
|
+
(www_article.s3_id_txt === undefined || typeof www_article.s3_id_txt === "string"));
|
|
27
30
|
}
|
|
28
31
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export class WWWArticle {
|
|
2
2
|
readonly www_article_id : string
|
|
3
3
|
readonly url : string
|
|
4
|
-
readonly title : string
|
|
4
|
+
readonly title? : string
|
|
5
5
|
readonly date? : string
|
|
6
6
|
readonly relevance? : string
|
|
7
|
-
readonly
|
|
7
|
+
readonly s3_id_html? : string
|
|
8
|
+
readonly s3_id_txt? : string
|
|
8
9
|
|
|
9
10
|
constructor(www_article : WWWArticle) {
|
|
10
11
|
if (!WWWArticle.is(www_article)) {
|
|
@@ -15,7 +16,8 @@ export class WWWArticle {
|
|
|
15
16
|
this.title = www_article.title
|
|
16
17
|
this.date = www_article.date
|
|
17
18
|
this.relevance = www_article.relevance
|
|
18
|
-
this.
|
|
19
|
+
this.s3_id_html = www_article.s3_id_html
|
|
20
|
+
this.s3_id_txt = www_article.s3_id_txt
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
static is(www_article : any) : www_article is WWWArticle {
|
|
@@ -23,10 +25,11 @@ export class WWWArticle {
|
|
|
23
25
|
www_article !== undefined &&
|
|
24
26
|
typeof www_article.www_article_id === "string" &&
|
|
25
27
|
typeof www_article.url === "string" &&
|
|
26
|
-
typeof www_article.title === "string" &&
|
|
28
|
+
(www_article.title === undefined || typeof www_article.title === "string") &&
|
|
27
29
|
(www_article.date === undefined || typeof www_article.date === "string") &&
|
|
28
30
|
(www_article.relevance === undefined || typeof www_article.relevance === "string") &&
|
|
29
|
-
(www_article.
|
|
31
|
+
(www_article.s3_id_html === undefined || typeof www_article.s3_id_html === "string") &&
|
|
32
|
+
(www_article.s3_id_txt === undefined || typeof www_article.s3_id_txt === "string")
|
|
30
33
|
)
|
|
31
34
|
}
|
|
32
35
|
}
|