@monaco-editor/react
Advanced tools
Comparing version 2.0.0 to 2.1.0
### Versions | ||
## 2.1.0 | ||
###### *Oct 25, 2019* | ||
- add monaco-editor as peer dependency for proper type definitions | ||
- write more proper types | ||
## 2.0.0 | ||
@@ -4,0 +10,0 @@ ###### *Oct 9, 2019* |
// TODO: the whole content should be improved in the next version. | ||
import * as React from "react"; | ||
import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api'; | ||
@@ -13,3 +14,3 @@ type Theme = | ||
getEditorValue: () => string, | ||
editor: any, | ||
editor: monacoEditor.editor.IStandaloneCodeEditor, | ||
) => void; | ||
@@ -73,3 +74,3 @@ | ||
export type ControlledEditorOnChange = ( | ||
ev: any, | ||
ev: monacoEditor.editor.IModelContentChangedEvent, | ||
value: string | undefined, | ||
@@ -80,3 +81,3 @@ ) => string | void; | ||
/** | ||
* Signature: function(ev: any, value: string | undefined) => string | undefined; | ||
* Signature: function(ev: monacoEditor.editor.IModelContentChangedEvent, value: string | undefined) => string | undefined; | ||
* onChange method of monaco editor. It will be called right after content of current model will be changed. | ||
@@ -98,3 +99,3 @@ * It gets two arguments: first one is the "event" object of monaco, second one the current value | ||
getModifiedEditorValue: () => string, | ||
editor: any, | ||
editor: monacoEditor.editor.IStandaloneCodeEditor, | ||
) => void; | ||
@@ -176,3 +177,3 @@ | ||
export type Monaco = any; | ||
export type Monaco = typeof monacoEditor; | ||
@@ -179,0 +180,0 @@ declare namespace monaco { |
{ | ||
"name": "@monaco-editor/react", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Monaco editor wrapper for easy/one-line integration with React applications (e.g. powered by create-react-app) without need of webpack configuration files", | ||
@@ -33,2 +33,3 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"monaco-editor": "^0.18.1", | ||
"prop-types": "^15.7.2", | ||
@@ -35,0 +36,0 @@ "react": "^16.8.6", |
67801
35
856
4