File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
pyscriptjs/src/components Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { basicSetup , EditorState , EditorView } from '@codemirror/basic-setup' ;
2
2
import { python } from '@codemirror/lang-python' ;
3
- import { Compartment , StateCommand } from '@codemirror/state' ;
4
- import { keymap } from '@codemirror/view' ;
3
+ import { Compartment } from '@codemirror/state' ;
4
+ import { keymap , type Command } from '@codemirror/view' ;
5
5
import { defaultKeymap } from '@codemirror/commands' ;
6
6
import { oneDarkTheme } from '@codemirror/theme-one-dark' ;
7
7
@@ -32,13 +32,13 @@ mode.subscribe(value => {
32
32
currentMode = value ;
33
33
} ) ;
34
34
35
- function createCmdHandler ( el : PyRepl ) : StateCommand {
35
+ function createCmdHandler ( el : PyRepl ) : Command {
36
36
// Creates a codemirror cmd handler that calls the el.evaluate when an event
37
37
// triggers that specific cmd
38
- const toggleCheckbox : StateCommand = ( { state, dispatch } ) => {
39
- return el . evaluate ( state ) ;
38
+ return ( ) => {
39
+ void el . evaluate ( ) ;
40
+ return true ;
40
41
} ;
41
- return toggleCheckbox ;
42
42
}
43
43
44
44
let initialTheme : string ;
You can’t perform that action at this time.
0 commit comments