@types/postlight__mercury-parser
TypeScript icon, indicating that this package has built-in type declarations

2.2.7 • Public • Published

Installation

npm install --save @types/postlight__mercury-parser

Summary

This package contains type definitions for @postlight/mercury-parser (https://github.com/postlight/mercury-parser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postlight__mercury-parser.

index.d.ts

/// <reference types="node" />

export interface ParseResult {
    title: string | null;
    content: string | null;
    author: string | null;
    date_published: string | null;
    lead_image_url: string | null;
    dek: string | null;
    next_page_url: string | null;
    url: string;
    domain: string;
    excerpt: string | null;
    word_count: number;
    direction: "ltr" | "rtl";
    total_pages: number;
    rendered_pages: number;
}

export interface ParseOptions {
    contentType?: "html" | "markdown" | "text" | undefined;
    headers?: object | undefined;
    html?: string | Buffer | undefined;
}

export function parse(url: string, options?: ParseOptions): Promise<ParseResult>;
export function fetchResource(url: string): Promise<string>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Malo Bourgon.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/postlight__mercury-parser

Weekly Downloads

446

Version

2.2.7

License

MIT

Unpacked Size

4.26 kB

Total Files

5

Last publish

Collaborators

  • types