File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,11 @@ class CodeByteOffsets {
52
52
}
53
53
54
54
class SimpleEditor extends React . PureComponent < CommonEditorProps > {
55
- private _editor : HTMLTextAreaElement | undefined = undefined ;
55
+ private _editor : HTMLTextAreaElement | null = null ;
56
56
57
- private onChange = e => this . props . onEditCode ( e . target . value ) ;
58
- private trackEditor = component => this . _editor = component ;
59
- private onKeyDown = e => {
57
+ private onChange : React . ChangeEventHandler < HTMLTextAreaElement > = e => this . props . onEditCode ( e . target . value ) ;
58
+ private trackEditor : React . RefCallback < HTMLTextAreaElement > = component => this . _editor = component ;
59
+ private onKeyDown : React . KeyboardEventHandler < HTMLTextAreaElement > = e => {
60
60
if ( e . key === 'Enter' && ( e . ctrlKey || e . metaKey ) ) {
61
61
this . props . execute ( ) ;
62
62
}
@@ -78,7 +78,7 @@ class SimpleEditor extends React.PureComponent<CommonEditorProps> {
78
78
) ;
79
79
}
80
80
81
- public componentDidUpdate ( prevProps , _prevState ) {
81
+ public componentDidUpdate ( prevProps : CommonEditorProps ) {
82
82
this . gotoPosition ( prevProps . position , this . props . position ) ;
83
83
this . setSelection ( prevProps . selection , this . props . selection ) ;
84
84
}
You can’t perform that action at this time.
0 commit comments