Merge pull request #7559 from RaduW/master

fixed CodeMirror.TextMarker.find() return type
This commit is contained in:
Masahiro Wakame
2016-01-22 18:10:20 +09:00
2 changed files with 148 additions and 143 deletions
+10 -5
View File
@@ -606,7 +606,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;
@@ -650,7 +650,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;
@@ -800,9 +805,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 CodeMirrors placeholder add-on. */
lint?: boolean | LintOptions;
/** Optional value to be used in conduction with CodeMirrors placeholder add-on. */
placeholder?: string;
}