UNPKG

@opentui/core

Version:

OpenTUI is a TypeScript library for building terminal user interfaces (TUIs)

11 lines (10 loc) 432 B
import { type MarkedToken } from "marked"; export interface ParseState { content: string; tokens: MarkedToken[]; } /** * Incrementally parse markdown, reusing unchanged tokens from previous parse. * Compares token.raw at each offset - matching tokens keep same object reference. */ export declare function parseMarkdownIncremental(newContent: string, prevState: ParseState | null, trailingUnstable?: number): ParseState;