import { TextDocument , window , TextEditorDecorationType , TextEditor } from 'vscode' ; export function findEditorsForDocument ( document ) { return window . visibleTextEditors . filter ( ( p ) => p . document . uri === document . uri ) ; } export const clearEditorDecorations = ( document , decorations ) => { const editors = findEditorsForDocument ( document ) ; if ( editors ) { decorations . forEach ( ( decoration ) => { decoration . dispose ( ) ; editors . forEach ( ( editor ) => editor . setDecorations ( decoration , [ ] ) ) ; } ) ; } } ;