diff --git a/codemirror/codemirror-matchbrackets-tests.ts b/codemirror/codemirror-matchbrackets-tests.ts new file mode 100644 index 000000000..2189612c0 --- /dev/null +++ b/codemirror/codemirror-matchbrackets-tests.ts @@ -0,0 +1,4 @@ +/// +/// + +var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body, { matchBrackets: true }); diff --git a/codemirror/codemirror-matchbrackets.d.ts b/codemirror/codemirror-matchbrackets.d.ts new file mode 100644 index 000000000..13241a5a3 --- /dev/null +++ b/codemirror/codemirror-matchbrackets.d.ts @@ -0,0 +1,13 @@ +// Type definitions for CodeMirror +// Project: https://github.com/marijnh/CodeMirror +// Definitions by: Sixin Li +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// See docs https://codemirror.net/doc/manual.html#addon_matchbrackets + +declare module CodeMirror { + interface EditorConfiguration { + // when set to true, causes matching brackets to be highlighted whenever the cursor is next to them + matchBrackets?: boolean; + } +}