mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
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:
Vendored
+10
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user