File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,7 @@ export function lockCodeWithoutDecoration (
156156}
157157
158158export function hideCodeWithoutDecoration ( editor : monaco . editor . IStandaloneCodeEditor , decorations : string [ ] ) : ( ) => void {
159- // eslint-disable-next-line @typescript-eslint/no-explicit-any
160- let otherHiddenAreas : monaco . IRange [ ] = ( editor as any ) . _getViewModel ( ) . _lines . getHiddenAreas ( )
159+ let otherHiddenAreas : monaco . IRange [ ] = editor . _getViewModel ( ) ?. getHiddenAreas ( ) ?? [ ]
161160 function getHiddenAreas ( ) {
162161 const model = editor . getModel ( ) !
163162
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ declare module 'monaco-editor' {
66 // This method is internal and is supposed to be used by the folding feature
77 // We still use it to hide parts of the code in the `hideCodeWithoutDecoration` function
88 setHiddenAreas ( ranges : IRange [ ] ) : void
9+
10+ _getViewModel ( ) : {
11+ getHiddenAreas ( ) : IRange [ ]
12+ } | undefined
913 }
1014 }
1115}
You can’t perform that action at this time.
0 commit comments