diff --git a/codemirror/codemirror.d.ts b/codemirror/codemirror.d.ts index 2ca58c702..1df15739b 100644 --- a/codemirror/codemirror.d.ts +++ b/codemirror/codemirror.d.ts @@ -601,7 +601,7 @@ declare module CodeMirror { /** Returns a {from, to} object (both holding document positions), indicating the current position of the marked range, or undefined if the marker is no longer in the document. */ - find(): CodeMirror.Position; + find(): CodeMirror.Range; /** Returns an object representing the options for the marker. If copyWidget is given true, it will clone the value of the replacedWith option, if any. */ getOptions(copyWidget: boolean): CodeMirror.TextMarkerOptions; @@ -645,7 +645,12 @@ declare module CodeMirror { new (line: number, ch: number): Position; (line: number, ch: number): Position; } - + + interface Range{ + from: CodeMirror.Position; + to: CodeMirror.Position; + } + interface Position { ch: number; line: number; @@ -795,9 +800,9 @@ declare module CodeMirror { viewportMargin?: number; /** Optional lint configuration to be used in conjunction with CodeMirror's linter addon. */ - lint?: boolean | LintOptions; - - /** Optional value to be used in conduction with CodeMirror’s placeholder add-on. */ + lint?: boolean | LintOptions; + + /** Optional value to be used in conduction with CodeMirror’s placeholder add-on. */ placeholder?: string; }