"use strict" ; import { ConfigurationChangeEvent , Event , EventEmitter , workspace , WorkspaceConfiguration , ConfigurationTarget , Uri } from "vscode" ; const extensionName = "taskExplorer" ; class Configuration { private configuration : WorkspaceConfiguration ; private _onDidChange = new EventEmitter < ConfigurationChangeEvent > ( ) ; constructor ( ) { this . configuration = workspace . getConfiguration ( extensionName ) ; workspace . onDidChangeConfiguration ( this . onConfigurationChanged , this ) ; } private onConfigurationChanged ( event ) { if ( event . affectsConfiguration ( extensionName ) ) { this . configuration = workspace . getConfiguration ( extensionName ) ; this . _onDidChange . fire ( event ) ; } } public get < T > ( section , defaultValue ? ) { return this . configuration . get < T > ( section , defaultValue ! ) ; } public update ( section , value ) { return this . configuration . update ( section , value , ConfigurationTarget . Global ) ; } public updateWs ( section , value ) { return workspace . getConfiguration ( extensionName ) . update ( section , value , ConfigurationTarget . Workspace ) ; } } export const configuration = new Configuration ( ) ;