Skip to content

Commit 75aa31c

Browse files
committed
Add a type declaration
1 parent 9415adc commit 75aa31c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {EditorState, StateCommand, EditorSelection, SelectionRange,
2-
ChangeSpec, Transaction, CharCategory,
2+
StateEffect, ChangeSpec, Transaction, CharCategory,
33
findClusterBreak, Text, Line, countColumn} from "@codemirror/state"
44
import {EditorView, Command, Direction, KeyBinding} from "@codemirror/view"
55
import {syntaxTree, IndentContext, getIndentUnit, indentUnit, indentString,
@@ -218,7 +218,7 @@ function cursorByPage(view: EditorView, forward: boolean) {
218218
: rangeEnd(range, forward)
219219
})
220220
if (selection.eq(state.selection)) return false
221-
let effect
221+
let effect: StateEffect<any> | undefined
222222
if (page.selfScroll) {
223223
let startPos = view.coordsAtPos(state.selection.main.head)
224224
let scrollRect = view.scrollDOM.getBoundingClientRect()

0 commit comments

Comments
 (0)