mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
35 lines
947 B
TypeScript
35 lines
947 B
TypeScript
// Type definitions for non-npm package mozilla-readability 0.1
|
|
// Project: https://github.com/mozilla/readability
|
|
// Definitions by: Charles Vandevoorde <https://github.com/charlesvdv>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.2
|
|
|
|
export = Readability;
|
|
|
|
declare class Readability {
|
|
constructor(doc: Document, options?: Readability.Options);
|
|
|
|
parse(): Readability.ParseResult;
|
|
isProbablyReaderable(helperIsVisible?: (node: any) => boolean): boolean;
|
|
}
|
|
|
|
declare namespace Readability {
|
|
interface Options {
|
|
debug?: boolean;
|
|
maxElemsToParse?: number;
|
|
nbTopCandidates?: number;
|
|
wordThreshold?: number;
|
|
classesToPreserve?: string[];
|
|
}
|
|
|
|
interface ParseResult {
|
|
title: string;
|
|
byline: string;
|
|
dir: string;
|
|
content: string;
|
|
textContent: string;
|
|
length: number;
|
|
excerpt: string;
|
|
}
|
|
}
|