Update react-monaco-editor types to track 0.10 (#20464)

This commit is contained in:
Joshua Netterfield
2017-10-16 11:52:55 -07:00
committed by Andy
parent f530bf01f5
commit 5f3cbdcfb3
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
// Type definitions for react-monaco-editor 0.8
// Type definitions for react-monaco-editor 0.10
// Project: https://github.com/superRaytin/react-monaco-editor
// Definitions by: Joshua Netterfield <https://github.com/jnetterf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -31,7 +31,7 @@ export interface ReactMonacoEditorProps {
defaultValue?: string;
/**
* The initial language of the auto created model in the editor.
* The initial language of the auto created model in the editor. Defaults to 'javascript'.
*/
language?: string;
@@ -60,7 +60,7 @@ export interface ReactMonacoEditorProps {
/**
* An event emitted when the content of the current model has changed.
*/
onChange?(val: string, ev: monaco.editor.IModelContentChangedEvent2): void;
onChange?(val: string, ev: monaco.editor.IModelContentChangedEvent): void;
/**
* Optional, allow to config loader url and relative path of module, refer to require.config.
+2 -2
View File
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"monaco-editor": "0.8.3"
"monaco-editor": "^0.10.0"
}
}
}
@@ -21,7 +21,7 @@ class CodeEditor extends React.Component<object, CodeEditorState> {
console.log('editorDidMount', editor, editor.getValue(), editor.getModel());
this.editor = editor;
}
onChange = (newValue: string, e: monaco.editor.IModelContentChangedEvent2) => {
onChange = (newValue: string, e: monaco.editor.IModelContentChangedEvent) => {
console.log('onChange', newValue, e);
this.setState({
code: newValue,