6.1.1 • Published 2 months ago

@types/marked-terminal v6.1.1

Weekly downloads
9,419
License
MIT
Repository
github
Last release
2 months ago

Installation

npm install --save @types/marked-terminal

Summary

This package contains type definitions for marked-terminal (https://github.com/mikaelbr/marked-terminal).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/marked-terminal.

index.d.ts

// Type definitions for marked-terminal 3.1
// Project: https://github.com/mikaelbr/marked-terminal
// Definitions by: Bryan Kendall <https://github.com/bkendall>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { Chalk } from 'chalk';
import { Renderer } from 'marked';

export as namespace TerminalRenderer;

export = TerminalRenderer;

declare class TerminalRenderer extends Renderer {
  constructor(options?: TerminalRenderer.TerminalRendererOptions)
}

declare namespace TerminalRenderer {
  interface TerminalRendererOptions {
    code?: Chalk | ((s: string) => string) | undefined;
    blockquote?: Chalk | ((s: string) => string) | undefined;
    html?: Chalk | ((s: string) => string) | undefined;
    heading?: Chalk | ((s: string) => string) | undefined;
    firstHeading?: Chalk | ((s: string) => string) | undefined;
    hr?: Chalk | ((s: string) => string) | undefined;
    listitem?: Chalk | ((s: string) => string) | undefined;
    table?: Chalk | ((s: string) => string) | undefined;
    paragraph?: Chalk | ((s: string) => string) | undefined;
    strong?: Chalk | ((s: string) => string) | undefined;
    em?: Chalk | ((s: string) => string) | undefined;
    codespan?: Chalk | ((s: string) => string) | undefined;
    del?: Chalk | ((s: string) => string) | undefined;
    link?: Chalk | ((s: string) => string) | undefined;
    href?: Chalk | ((s: string) => string) | undefined;

    // Formats the bulletpoints and numbers for lists
    list?: ((body: string, ordered?: boolean) => string) | undefined;

    // Reflow and print-out width
    width?: number | undefined; // only applicable when reflow is true
    reflowText?: boolean | undefined;

    // Should it prefix headers?
    showSectionPrefix?: boolean | undefined;

    // Whether or not to undo marked escaping
    // of enitities (" -> &quot; etc)
    unescape?: boolean | undefined;

    // Whether or not to show emojis
    emoji?: boolean | undefined;

    // Options passed to cli-table
    tableOptions?: any;

    // The size of tabs in number of spaces or as tab characters
    tab?: number | undefined;
  }
}

Additional Details

Credits

These definitions were written by Bryan Kendall.

6.1.1

2 months ago

6.1.0

3 months ago

3.1.7

7 months ago

3.1.6

7 months ago

3.1.5

7 months ago

3.1.4

7 months ago

6.0.1

6 months ago

6.0.0

6 months ago

3.1.3

2 years ago

3.1.2

3 years ago

3.1.1

5 years ago

3.1.0

5 years ago