File tree 3 files changed +4
-7
lines changed
3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,7 @@ type State = {
66
66
* div, and provides a wide variety of useful function props for managing the
67
67
* state of the editor. See `DraftEditorProps` for details.
68
68
*/
69
- class DraftEditor extends React . Component {
70
- props : DraftEditorProps ;
71
- state : State ;
72
-
69
+ class DraftEditor extends React . Component < DraftEditorProps , State > {
73
70
static defaultProps : DraftEditorDefaultProps = {
74
71
blockRenderMap : DefaultDraftBlockRenderMap ,
75
72
blockRendererFn : emptyFunction . thatReturnsNull ,
@@ -213,7 +210,7 @@ class DraftEditor extends React.Component {
213
210
return null ;
214
211
}
215
212
216
- render ( ) : React . Element < any > {
213
+ render ( ) : React . Node {
217
214
const { readOnly, textAlignment} = this . props ;
218
215
const rootClass = cx ( {
219
216
'DraftEditor/root' : true ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const EditorState = require('EditorState');
19
19
const containsNode = require ( 'containsNode' ) ;
20
20
const getActiveElement = require ( 'getActiveElement' ) ;
21
21
22
- function editOnBlur ( editor : DraftEditor , e : SyntheticEvent ) : void {
22
+ function editOnBlur ( editor : DraftEditor , e : SyntheticEvent < > ) : void {
23
23
// In a contentEditable element, when you select a range and then click
24
24
// another active element, this does trigger a `blur` event but will not
25
25
// remove the DOM selection from the contenteditable.
Original file line number Diff line number Diff line change 15
15
16
16
var Keys = require ( 'Keys' ) ;
17
17
18
- function isSoftNewlineEvent ( e : SyntheticKeyboardEvent ) : boolean {
18
+ function isSoftNewlineEvent ( e : SyntheticKeyboardEvent < > ) : boolean {
19
19
return e . which === Keys . RETURN && (
20
20
e . getModifierState ( 'Shift' ) ||
21
21
e . getModifierState ( 'Alt' ) ||
You can’t perform that action at this time.
0 commit comments