import { Tokenize, Eater } from './tokenize-factory'; import Tokenizer from './tokenizer'; import { Node, Location } from '../node'; export declare type Processor = { blockTokenizers: Tokenizers; inlineTokenizers: Tokenizers; data: ParserData; }; export interface Decoder { (value: string, position: Location, handler: Function): void; raw(value: string, position: Location): string; } export declare type Tokenizers = { name: string; func: Tokenizer; }[]; export declare type ParserData = { escape?: { commonmark?: string[]; gfm?: string[]; default?: string[]; }; }; export declare type ParserOptions = { commonmark?: boolean; gfm?: boolean; default?: boolean; footnotes?: boolean; pedantic?: boolean; yaml?: boolean; position?: boolean; breaks?: boolean; }; export declare type SimpleParser = { setOptions(options: ParserOptions): SimpleParser; indent(start: number): (offset: number) => void; toOffset?: Function; offset?: { [line: number]: number; }; context: { inLink: boolean; inList: boolean; atStart: boolean; inBlock: boolean; inAutoLink: boolean; }; options: ParserOptions; escape?: string[]; blockTokenizers: Tokenizers; inlineTokenizers: Tokenizers; eof?: Location; }; export declare type Parser = SimpleParser & { decode: Decoder; descape: Function; tokenizeBlock?: Tokenize; tokenizeInline?: Tokenize; tryTokenizeBlock?: (eat: Eater, tokenizerName: string, subvalue: string, silent: boolean) => Promise; parse(contents: string, opts?: ParserOptions): Promise; };