Skip to content

Commit 8c0ff87

Browse files
authored
Add null | undefined to parse results. Fixes #937 (#944)
1 parent 706c3d1 commit 8c0ff87

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,33 @@ export class Readability<T = string> {
3232

3333
parse(): null | {
3434
/** article title */
35-
title: string;
35+
title: string | null | undefined;
3636

3737
/** HTML string of processed article content */
38-
content: T;
38+
content: T | null | undefined;
3939

4040
/** text content of the article, with all the HTML tags removed */
41-
textContent: string;
41+
textContent: string | null | undefined;
4242

4343
/** length of an article, in characters */
44-
length: number;
44+
length: number | null | undefined;
4545

4646
/** article description, or short excerpt from the content */
47-
excerpt: string;
47+
excerpt: string | null | undefined;
4848

4949
/** author metadata */
50-
byline: string;
50+
byline: string | null | undefined;
5151

5252
/** content direction */
53-
dir: string;
53+
dir: string | null | undefined;
5454

5555
/** name of the site */
56-
siteName: string;
56+
siteName: string | null | undefined;
5757

5858
/** content language */
59-
lang: string;
59+
lang: string | null | undefined;
6060

6161
/** published time */
62-
publishedTime: string;
62+
publishedTime: string | null | undefined;
6363
};
6464
}

0 commit comments

Comments
 (0)