@@ -32,14 +32,14 @@ export interface IReactCodemirror extends IDOMEvent {
32
32
* changeObj has a similar type as the object passed to the editor's "change" event,
33
33
* but it never has a next property, because document change events are not batched (whereas editor change events are).
34
34
*/
35
- onChange ?: ( instance : CodeMirror . Editor , change : CodeMirror . EditorChangeLinkedList ) => void ;
35
+ onChange ?: ( instance : CodeMirror . Editor , change : CodeMirror . EditorChange ) => void ;
36
36
/**
37
37
* Like the "change" event, but batched per operation, passing an
38
38
* array containing all the changes that happened in the operation.
39
39
* This event is fired after the operation finished, and display
40
40
* changes it makes will trigger a new operation.
41
41
* */
42
- onChanges ?: ( instance : CodeMirror . Editor , change : CodeMirror . EditorChangeLinkedList [ ] ) => void ;
42
+ onChanges ?: ( instance : CodeMirror . Editor , change : CodeMirror . EditorChange [ ] ) => void ;
43
43
/**
44
44
* This event is fired before a change is applied, and its handler may choose to modify or cancel the change.
45
45
* The changeObj never has a next property, since this is fired for each individual change, and not batched per operation.
@@ -121,8 +121,11 @@ export interface IReactCodemirror extends IDOMEvent {
121
121
* */
122
122
onRedraw ?( ) : void ;
123
123
}
124
- export default class ReactCodemirror extends React . Component < IReactCodemirror > {
124
+
125
+ export interface IEditorInstance {
125
126
editor : Editor ;
126
- static defaultProps : IReactCodemirror ;
127
- render ( ) : JSX . Element ;
128
127
}
128
+
129
+ declare const ReactCodemirror : ( props : IReactCodemirror & React . RefAttributes < IEditorInstance | undefined > ) => JSX . Element ;
130
+
131
+ export default ReactCodemirror ;
0 commit comments