UNPKG

1.47 kBTypeScriptView Raw
1import '../../';
2
3declare module '../../' {
4 interface AutoCloseBrackets {
5 /**
6 * String containing pairs of matching characters.
7 */
8 pairs?: string | undefined;
9
10 /**
11 * If the next character is in the string, opening a bracket should be auto-closed.
12 */
13 closeBefore?: string | undefined;
14
15 /**
16 * String containing chars that could do a triple quote.
17 */
18 triples?: string | undefined;
19
20 /**
21 * explode should be a similar string that gives the pairs of characters that, when enter is pressed between them, should have the second character also moved to its own line.
22 */
23 explode?: string | undefined;
24
25 /**
26 * By default, if the active mode has a closeBrackets property, that overrides the configuration given in the option.
27 * But you can add an override property with a truthy value to override mode-specific configuration.
28 */
29 override?: boolean | undefined;
30 }
31
32 interface EditorConfiguration {
33 /**
34 * Will auto-close brackets and quotes when typed.
35 * By default, it'll auto-close ()[]{}''"", but you can pass it a string similar to that (containing pairs of matching characters),
36 * or an object with pairs and optionally explode properties to customize it.
37 */
38 autoCloseBrackets?: AutoCloseBrackets | boolean | string | undefined;
39 }
40}