Improve types for CodeMirror's runmode addon

This commit is contained in:
Joseph Vaughan
2015-12-21 13:59:31 +00:00
parent 8b7eef80b3
commit 38223f88db
+2 -2
View File
@@ -8,7 +8,7 @@
declare module CodeMirror {
/**
* Can be used to run a CodeMirror mode over text without actually opening an editor instance.
* Runs a CodeMirror mode over text without opening an editor instance.
*
* @param text The document to run through the highlighter.
* @param mode The mode to use (must be loaded as normal).
@@ -18,5 +18,5 @@ declare module CodeMirror {
* tokens will be converted to span elements as in an editor,
* and inserted into the node (through innerHTML).
*/
function runMode(text : string, mode : any, output : any): void;
function runMode(text: string, modespec: any, callback: (HTMLElement | ((text: string, style: string) => void)), options? : { tabSize?: number; state?: any; }): void;
}