Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null | undefined to parse results. Fixes #937 #944

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
};
}