import * as vscode from "vscode" ; const DECORATION_CONFLICT = new vscode . FileDecoration ( "C" , "conflict" , new vscode . ThemeColor ( "list.warningForeground" ) ) ; const DECORATION_DUPLICATE = new vscode . FileDecoration ( "D" , "duplicate" , new vscode . ThemeColor ( "list.deemphasizedForeground" ) ) ; class DecorationProvider implements vscode . FileDecorationProvider { private disposables : vscode . Disposable [ ] = [ ] ; constructor ( ) { this . disposables . push ( vscode . window . registerFileDecorationProvider ( this ) ) ; } public provideFileDecoration ( uri ) { if ( uri . query === "hasConflict" ) { return DECORATION_CONFLICT ; } else if ( uri . query === "isDuplicate" ) { return DECORATION_DUPLICATE ; } else { return null ; } } public dispose ( ) { this . disposables . forEach ( d => d . dispose ( ) ) ; } } export const decorationProvider = new DecorationProvider ( ) ;