File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 */
2121import { EditorView , lineNumbers } from '@codemirror/view' ;
2222import { EditorState , Compartment } from '@codemirror/state' ;
23- import { syntaxHighlighting } from '@codemirror/language' ;
23+ import { type LanguageSupport , syntaxHighlighting } from '@codemirror/language' ;
2424import { classHighlighter } from '@lezer/highlight' ;
2525import { cpp } from '@codemirror/lang-cpp' ;
2626import { rust } from '@codemirror/lang-rust' ;
@@ -46,9 +46,7 @@ const highlightedLineConf = new Compartment();
4646const lineNumbersConf = new Compartment ( ) ;
4747
4848// Detect the right language based on the file extension.
49- function _languageExtForPath (
50- path : string | null
51- ) : any /* LanguageSupport | [] */ {
49+ function _languageExtForPath ( path : string | null ) : LanguageSupport | [ ] {
5250 if ( path === null ) {
5351 return [ ] ;
5452 }
You can’t perform that action at this time.
0 commit comments