2.2.7 • Published 6 months ago
@types/postlight__mercury-parser v2.2.7
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
// Type definitions for @postlight/mercury-parser 2.2
// Project: https://github.com/postlight/mercury-parser
// Definitions by: Malo Bourgon <https://github.com/malob>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
/// <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: Thu, 08 Jul 2021 20:19:45 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Malo Bourgon.