-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
34 lines (34 loc) · 988 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export interface CommendOptions {
/** Bold */
'**'?(text: string): string;
/** Italics */
__?(text: string): string;
/** Strikethrough */
'~~'?(text: string): string;
/** Unordered list */
'-'?(items: string[]): string;
/** Ordered list */
'.'?(items: string[]): string;
/** Spoiler */
'||'?(text: string): string;
/** URL */
'<>'?(href: string, text: string): string;
/** Quote */
'>'?(text: string): string;
/**
* Whether quotes can stretch multiple lines (blockquotes) or a newline always ends the quote (greentexting)
* @default true
*/
'>continuous'?: boolean;
/** Mention */
'@'?(text: string): string;
/**
* Whether to stop parsing the current mention (this character won't be included)
* @param parsed Accumulated mention text
*/
'@end'?(char: string, parsed: text): boolean;
/** Newline replacement */
'\n'?: string;
}
declare function commend(options: CommendOptions): (str: string) => string;
export = commend;