Skip to content

Commit

Permalink
Add null | undefined to parse results. Fixes #937 (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnixon authored Jan 9, 2025
1 parent 706c3d1 commit 8c0ff87
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,33 @@ export class Readability<T = string> {

parse(): null | {
/** article title */
title: string;
title: string | null | undefined;

/** HTML string of processed article content */
content: T;
content: T | null | undefined;

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

/** length of an article, in characters */
length: number;
length: number | null | undefined;

/** article description, or short excerpt from the content */
excerpt: string;
excerpt: string | null | undefined;

/** author metadata */
byline: string;
byline: string | null | undefined;

/** content direction */
dir: string;
dir: string | null | undefined;

/** name of the site */
siteName: string;
siteName: string | null | undefined;

/** content language */
lang: string;
lang: string | null | undefined;

/** published time */
publishedTime: string;
publishedTime: string | null | undefined;
};
}

0 comments on commit 8c0ff87

Please sign in to comment.