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 {
5252}
5353
5454class SimpleEditor extends React . PureComponent < CommonEditorProps > {
55- private _editor : HTMLTextAreaElement | undefined = undefined ;
55+ private _editor : HTMLTextAreaElement | null = null ;
5656
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 => {
6060 if ( e . key === 'Enter' && ( e . ctrlKey || e . metaKey ) ) {
6161 this . props . execute ( ) ;
6262 }
@@ -78,7 +78,7 @@ class SimpleEditor extends React.PureComponent<CommonEditorProps> {
7878 ) ;
7979 }
8080
81- public componentDidUpdate ( prevProps , _prevState ) {
81+ public componentDidUpdate ( prevProps : CommonEditorProps ) {
8282 this . gotoPosition ( prevProps . position , this . props . position ) ;
8383 this . setSelection ( prevProps . selection , this . props . selection ) ;
8484 }
You can’t perform that action at this time.
0 commit comments