Skip to content

Commit 3f907ce

Browse files
kitetyjaywcjlove
authored andcommitted
fix: fix Position type error
1 parent f66ca32 commit 3f907ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typings/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import CodeMirror from 'codemirror';
2+
import CodeMirror, { Position } from 'codemirror';
33

44
export type DOMEvent = 'onMouseDown' | 'onDblClick' | 'onTouchStart' | 'onContextMenu' | 'onKeyDown' | 'onKeyPress'
55
| 'onKeyUp' | 'onCut' | 'onCopy' | 'onPaste' | 'onDragStart' | 'onDragEnter' | 'onDragOver' | 'onDragLeave' | 'onDrop';
@@ -59,7 +59,7 @@ export interface IReactCodemirror extends IDOMEvent {
5959
onBeforeSelectionChange?: (instance: CodeMirror.Editor, selection: { head: Position; anchor: Position; }) => void;
6060
/**
6161
* Fires whenever the view port of the editor changes (due to scrolling, editing, or any other factor).
62-
* The from and to arguments give the new start and end of the viewport.
62+
* The from and to arguments give the new start and end of the viewport.
6363
*/
6464
onViewportChange?: (instance: CodeMirror.Editor, from: number, to: number) => void;
6565
/** Fires when the editor gutter (the line-number area) is clicked. Will pass the editor instance as first argument,

0 commit comments

Comments
 (0)