Parsing API
Signatures and descriptions generated from the public TypeScript exports.
Public contracts
MarkdownStream
@quirekit/incremark-coreMITA headless source session; transport status never freezes syntax or reference dependencies.
export class MarkdownStream {
constructor(options?: MarkdownOptions);
get content(): string;
append(chunk: string): void;
reset(content?: string): void;
get state(): EditorState;
get pending(): boolean;
update(content: string): void;
advance(budget?: number): boolean;
}parseMarkdown
@quirekit/incremark-coreMITCompletes the canonical grammar for deterministic static rendering, without mounting a view. @param content - Exact source; the returned state uses CM logical newlines. @param options - Pure syntax and semantic extensions. @returns Accepted source snapshot, reusable by the Vue renderer or native consumers.
function parseMarkdown(content: string, options?: MarkdownOptions): EditorStateMarkdownOptions
@quirekit/incremark-coreMITSource configuration, fixed for the lifetime of one reading session.
export interface MarkdownOptions {
readonly preset?: "extended" | false;
readonly extensions?: readonly AnyExtension[];
readonly syntax?: readonly MarkdownExtension[];
}MarkdownLocale
@quirekit/incremark-coreMITReading control language, independent of document text.
export type MarkdownLocale = "zh-CN" | "en";MarkdownStatus
@quirekit/incremark-coreMITTransport metadata; no terminal status freezes parsing or discards received text.
export type MarkdownStatus = "receiving" | "complete" | "stopped" | "error";MarkdownReadingError
@quirekit/incremark-coreMITA source-preserving failure, isolated to its captured node or parsing session.
export interface MarkdownReadingError {
readonly owner: string;
readonly phase: "parse" | "read" | "load" | "render" | "dispose";
readonly from: number;
readonly to: number;
readonly cause: unknown;
}