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

1.3.7 • Public • Published

Installation

npm install --save @types/remark-prism

Summary

This package contains type definitions for remark-prism (https://github.com/sergioramos/remark-prism#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/remark-prism.

index.d.ts

import { Root } from "mdast";
import { Plugin } from "unified";

type SupportedPlugins =
    | "autolinker"
    | "command-line"
    | "data-uri-highlight"
    | "diff-highlight"
    | "inline-color"
    | "keep-markup"
    | "line-numbers"
    | "show-invisibles"
    | "treeview";

declare namespace remarkPrism {
    interface Options {
        transformInlineCode?: boolean;
        plugins?: SupportedPlugins[];
    }

    /**
     * Plugin to use prism with remark.
     * https://github.com/unifiedjs/unified/blob/main/index.d.ts#L488-L489
     */
    type Prism = Plugin<[Options?] | undefined[], Root, Root>;
}

declare const remarkPrism: remarkPrism.Prism;
export = remarkPrism;

Additional Details

Credits

These definitions were written by Hojun Bun, and Stephen Weiss.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/remark-prism

Weekly Downloads

1,844

Version

1.3.7

License

MIT

Unpacked Size

4.39 kB

Total Files

5

Last publish

Collaborators

  • types