From 0f7b4ef6562dee52346eeea87348547fc19dc31d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:17:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Avoid=20'any'=20type=20for=20edi?= =?UTF-8?q?torRef=20in=20EditorArea.tsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: beingniloy <235952944+beingniloy@users.noreply.github.com> --- src/components/EditorArea.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/EditorArea.tsx b/src/components/EditorArea.tsx index f1d8f58..83de56c 100644 --- a/src/components/EditorArea.tsx +++ b/src/components/EditorArea.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useState, useCallback, useRef, lazy, Suspense } from 'react'; const MonacoEditor = lazy(() => import('@monaco-editor/react')); import type { OnMount } from '@monaco-editor/react'; +import type { editor } from 'monaco-editor'; import { X, FileCode, Home, FilePlus, FolderPlus, FolderOpen, Copy, Scissors, Clipboard, Save, SaveAll, RefreshCw, Settings, Undo, Redo, Search, Braces, BookOpen, FileDown, CopyPlus } from 'lucide-react'; import { useSettings } from '../contexts/SettingsContext'; import { useFileSystem } from '../contexts/FileSystemContext'; @@ -21,7 +22,7 @@ export default React.memo(function EditorArea() { const [editorTheme, setEditorTheme] = useState('vs-light'); const [recentlyClosedTabs, setRecentlyClosedTabs] = useState([]); const { menu, menuRef, showMenu, hideMenu } = useContextMenu(); - const editorRef = useRef(null); + const editorRef = useRef(null); useEffect(() => { setEditorTheme(theme === 'light' ? 'light' : 'vs-dark'); @@ -43,9 +44,9 @@ export default React.memo(function EditorArea() { const activeItem = activeFile && activeFile !== 'welcome' ? findFileInTree(files, activeFile) : null; - const handleEditorDidMount: OnMount = useCallback((editor: any) => { + const handleEditorDidMount: OnMount = useCallback((editor: editor.IStandaloneCodeEditor) => { editorRef.current = editor; - editor.onDidChangeCursorPosition((e: any) => { + editor.onDidChangeCursorPosition((e) => { setCursorLine(e.position.lineNumber); setCursorCol(e.position.column); });