DefinitelyTyped/types/mozilla-readability/index.d.ts
MusiKid 3ad372f36c [mozilla-readability] remove deprecated code (Node global in tests and uri parameter) (#29701)
* [@types/mozilla-readability] Remove uri because it's not used anymore

* [@types/mozilla-readability] remove deprecated Node global in tests
2018-10-15 09:43:04 -07:00

35 lines
931 B
TypeScript

// Type definitions for 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;
}
}