diff --git a/src/components/shared/SourceView-codemirror.ts b/src/components/shared/SourceView-codemirror.ts index 6ddf2823b0..ea61ab2357 100644 --- a/src/components/shared/SourceView-codemirror.ts +++ b/src/components/shared/SourceView-codemirror.ts @@ -20,7 +20,7 @@ */ import { EditorView, lineNumbers } from '@codemirror/view'; import { EditorState, Compartment } from '@codemirror/state'; -import { syntaxHighlighting } from '@codemirror/language'; +import { type LanguageSupport, syntaxHighlighting } from '@codemirror/language'; import { classHighlighter } from '@lezer/highlight'; import { cpp } from '@codemirror/lang-cpp'; import { rust } from '@codemirror/lang-rust'; @@ -46,9 +46,7 @@ const highlightedLineConf = new Compartment(); const lineNumbersConf = new Compartment(); // Detect the right language based on the file extension. -function _languageExtForPath( - path: string | null -): any /* LanguageSupport | [] */ { +function _languageExtForPath(path: string | null): LanguageSupport | [] { if (path === null) { return []; }