File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { Button } from "@/components/ui/button";
13
13
import IModelContentChangedEvent = editor . IModelContentChangedEvent ;
14
14
import ITextModel = editor . ITextModel ;
15
15
import ICodeEditor = editor . ICodeEditor ;
16
+ import IStandaloneDiffEditor = editor . IStandaloneDiffEditor ;
16
17
17
18
export interface EditorComponentProps {
18
19
readonly : boolean ;
@@ -31,7 +32,7 @@ export interface EditorComponentProps {
31
32
const minLoadingTime = 150 ;
32
33
33
34
export function Editor ( props : EditorComponentProps ) {
34
- const editorRef = useRef < ICodeEditor | null > ( null ) ;
35
+ const editorRef = useRef < ICodeEditor | IStandaloneDiffEditor | null > ( null ) ;
35
36
const monacoRef = useRef < Monaco | null > ( null ) ;
36
37
const modelRef = useRef < ITextModel | null > ( null ) ;
37
38
const [ lastLoadingTime , setLastLoadingTime ] = useState ( minLoadingTime ) ;
@@ -74,7 +75,7 @@ export function Editor(props: EditorComponentProps) {
74
75
} , [ ] ) ;
75
76
76
77
const handleEditorDidMount = useCallback (
77
- ( editor : ICodeEditor , monaco : Monaco ) => {
78
+ ( editor : ICodeEditor | IStandaloneDiffEditor , monaco : Monaco ) => {
78
79
editorRef . current = editor ;
79
80
80
81
const options = {
You can’t perform that action at this time.
0 commit comments