UNPKG

1.45 kBTypeScriptView Raw
1import { UriComponents } from '../uri';
2export interface MarkdownString {
3 readonly value: string;
4 readonly isTrusted?: boolean;
5 readonly supportThemeIcons?: boolean;
6 readonly supportHtml?: boolean;
7 readonly baseUri?: UriComponents;
8 uris?: {
9 [href: string]: UriComponents;
10 };
11}
12export declare enum MarkdownStringTextNewlineStyle {
13 Paragraph = 0,
14 Break = 1
15}
16export declare namespace MarkdownString {
17 /**
18 * @returns whether the candidate satisfies the interface of a markdown string
19 */
20 function is(candidate: unknown): candidate is MarkdownString;
21}
22export declare class MarkdownStringImpl implements MarkdownString {
23 value: string;
24 isTrusted?: boolean;
25 supportThemeIcons?: boolean;
26 supportHtml?: boolean;
27 baseUri?: UriComponents;
28 constructor(value?: string, isTrustedOrOptions?: boolean | {
29 isTrusted?: boolean;
30 supportThemeIcons?: boolean;
31 supportHtml?: boolean;
32 });
33 appendText(value: string, newlineStyle?: MarkdownStringTextNewlineStyle): MarkdownStringImpl;
34 appendMarkdown(value: string): MarkdownStringImpl;
35 appendCodeblock(langId: string, code: string): MarkdownStringImpl;
36 appendLink(target: UriComponents | string, label: string, title?: string): MarkdownStringImpl;
37 private _escape;
38}
39export declare function escapeMarkdownSyntaxTokens(text: string): string;
40//# sourceMappingURL=markdown-string.d.ts.map
\No newline at end of file