monaco-editor 从 0.24 升级到 0.47 之后,下面的代码
private _diffNavigator?: monaco.editor.IDiffNavigator;
报错
Namespace 'monaco.editor' has no exported member 'IDiffNavigator'
请问如何解决?
参考 https://github.com/microsoft/monaco-editor/issues/4227 解决了
monaco.editor.IDiffNavigator
改为 monaco.editor.IStandaloneDiffEditor
monaco.editor.createDiffNavigator(editor)
改为 monaco.editor.createDiffEditor(editor.getContainerDomNode())
this._diffNavigator.next()
改为 this._diffEditor.goToDiff('next')
this._diffNavigator.previous()
改为 this._diffEditor.goToDiff('previous')
https://github.com/microsoft/monaco-editor/issues/4227
– dudu 8个月前https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0440
– dudu 8个月前