fixed CodeMirror.TextMarker.find() return type

Added CodeMirror.Range type
Changed CodeMirror.TextMarker.find() to return CodeMirror.Range instead
of CodeMirror.Position (which was wrong).
This commit is contained in:
Radu Woinaroski
2016-01-10 21:32:56 +01:00
parent 421d6610bd
commit 3a35d23702
+10 -5
View File
@@ -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 CodeMirrors placeholder add-on. */
lint?: boolean | LintOptions;
/** Optional value to be used in conduction with CodeMirrors placeholder add-on. */
placeholder?: string;
}