3.0.4 • Published 6 months ago

@types/to-markdown v3.0.4

Weekly downloads
339
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/to-markdown

Summary

This package contains type definitions for to-markdown (https://github.com/domchristie/to-markdown).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/to-markdown.

index.d.ts

// Type definitions for to-markdown 3.0
// Project: https://github.com/domchristie/to-markdown
// Definitions by: SuperPaintman <https://github.com/SuperPaintman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export = toMarkdown;

/**
 * Converts HTML to markdown.
 */
declare function toMarkdown(input: string, options?: toMarkdown.Options): string;

declare namespace toMarkdown {
  type Filter = string | string[] | ((node: HTMLElement) => boolean);

  interface Options {
    converters?: Converter[] | undefined;
    gfm?: boolean | undefined;
  }

  interface Converter {
    filter: Filter;
    replacement(innerHTML: string, node: HTMLElement): string;
  }

  /**
   * Returns true / false depending on whether the element is block level.
   */
  function isBlock(node: HTMLElement): boolean;

  /**
   * Returns true / false depending on whether the element is void.
   */
  function isVoid(node: HTMLElement): boolean;

  /**
   * Returns the HTML string of an element with its contents converted.
   */
  function outer(node: HTMLElement, content: string): boolean;
}

Additional Details

  • Last updated: Fri, 02 Jul 2021 19:37:12 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by SuperPaintman.

3.0.4

6 months ago

3.0.3

7 months ago

3.0.2

8 months ago

3.0.1

3 years ago

3.0.0

7 years ago

0.0.0

7 years ago