codemirror-languageservice
Version:
Integrate a Language Server Protocol compatible language service into CodeMirror
29 lines • 1.09 kB
TypeScript
import { type MarkedString, type MarkupContent } from 'vscode-languageserver-protocol';
import { type Promisable } from './types.js';
export declare namespace fromMarkupContent {
interface Options {
/**
* Convert a markdown string to DOM.
*
* @param markdown
* The markdown to convert
* @returns
* DOM nodes or text to append to the resulting DOM container.
*/
markdownToDom: (markdown: string) => Promisable<Iterable<Node | string> | Node | null | string | undefined | void>;
}
}
/**
* Convert LSP markup content or a marked string into a DOM.
*
* @param contents
* The LSP contents to process.
* @param parent
* The container node to append the DOM nodes to.
* @param options
* Additional options.
* @returns
* The parent container.
*/
export declare function fromMarkupContent<Parent extends ParentNode>(contents: MarkedString | MarkedString[] | MarkupContent, parent: Parent, options: fromMarkupContent.Options): Promise<Parent>;
//# sourceMappingURL=markup-content.d.ts.map