UNPKG

1.37 kBTypeScriptView Raw
1import "../../";
2
3declare module "../../" {
4 interface CommandActions {
5 closeTag(cm: Editor): void;
6 }
7
8 interface AutoCloseTags {
9 /**
10 * Whether to autoclose when the '/' of a closing tag is typed. (default true)
11 */
12 whenClosing?: boolean | undefined;
13
14 /**
15 * Whether to autoclose the tag when the final '>' of an opening tag is typed. (default true)
16 */
17 whenOpening?: boolean | undefined;
18
19 /**
20 * An array of tag names that should not be autoclosed. (default is empty tags for HTML, none for XML)
21 */
22 dontCloseTags?: readonly string[] | undefined;
23
24 /**
25 * An array of tag names that should, when opened, cause a
26 * blank line to be added inside the tag, and the blank line and
27 * closing line to be indented. (default is block tags for HTML, none for XML)
28 */
29 indentTags?: readonly string[] | undefined;
30
31 /**
32 * An array of XML tag names that should be autoclosed with '/>'. (default is none)
33 */
34 emptyTags: readonly string[];
35 }
36
37 interface EditorConfiguration {
38 /**
39 * Will auto-close XML tags when '>' or '/' is typed.
40 * Depends on the fold/xml-fold.js addon.
41 */
42 autoCloseTags?: AutoCloseTags | boolean | undefined;
43 }
44}