// TypeScript Version: 3.0 import {Node, Parent, Position} from 'unist' import {Parser, Plugin} from 'unified' declare class MrkdwnParser implements Parser { parse(): Node blockMethods: string[] inlineTokenizers: { [key: string]: mrkdwnParse.Tokenizer } inlineMethods: string[] } declare namespace mrkdwnParse { interface Parse extends Plugin<[PartialParseOptions?]> { (options: PartialParseOptions): void Parser: typeof MrkdwnParser } type Parser = MrkdwnParser interface ParseOptions { gfm: boolean commonmark: boolean footnotes: boolean blocks: string[] pedantic: boolean } type PartialParseOptions = Partial interface Add { (node: Node, parent?: Parent): Node test(): Position reset(node: Node, parent?: Node): Node } type Eat = (value: string) => Add type Locator = (value: string, fromIndex: number) => number interface Tokenizer { (eat: Eat, value: string, silent: true): boolean | void (eat: Eat, value: string): Node | void locator?: Locator onlyAtStart?: boolean notInBlock?: boolean notInList?: boolean notInLink?: boolean } } declare const mrkdwnParse: mrkdwnParse.Parse export = mrkdwnParse