Merge pull request #6630 from sixinli/fix_cm_showhint

`state` property belongs to CodeMirror.Editor, not CodeMorrir.Doc
This commit is contained in:
Basarat Ali Syed
2015-12-08 11:04:12 +11:00
2 changed files with 5 additions and 2 deletions
-2
View File
@@ -41,9 +41,7 @@ declare module CodeMirror {
off(eventName: string, handler: (doc: CodeMirror.Doc, event: any) => void): void;
}
/** Extend CodeMirror.Doc with a state object, so that the Doc.state.completionActive property is reachable*/
interface Doc {
state: any;
showHint: (options: ShowHintOptions) => void;
}
+5
View File
@@ -390,6 +390,9 @@ declare module CodeMirror {
The handler may mess with the style of the resulting element, or add event handlers, but should not try to change the state of the editor. */
on(eventName: 'renderLine', handler: (instance: CodeMirror.Editor, line: number, element: HTMLElement) => void ): void;
off(eventName: 'renderLine', handler: (instance: CodeMirror.Editor, line: number, element: HTMLElement) => void ): void;
/** Expose the state object, so that the Editor.state.completionActive property is reachable*/
state: any;
}
interface EditorFromTextArea extends Editor {
@@ -589,6 +592,8 @@ declare module CodeMirror {
/** The reverse of posFromIndex. */
indexFromPos(object: CodeMirror.Position): number;
/** Expose the state object, so that the Doc.state.completionActive property is reachable*/
state: any;
}
interface LineHandle {