From 38223f88dbb127d341aca6205c84dd51fc295657 Mon Sep 17 00:00:00 2001 From: Joseph Vaughan Date: Mon, 21 Dec 2015 13:59:31 +0000 Subject: [PATCH] Improve types for CodeMirror's runmode addon --- codemirror/codemirror-runmode.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codemirror/codemirror-runmode.d.ts b/codemirror/codemirror-runmode.d.ts index 89f35602f..58a8330a8 100644 --- a/codemirror/codemirror-runmode.d.ts +++ b/codemirror/codemirror-runmode.d.ts @@ -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; }