[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / mlir / utils / vscode / src / config.ts
blob04ff8f53c9e58612bf27d75c2de93b07f0764e93
1 import * as vscode from 'vscode';
3 /**
4  *  Gets the config value `mlir.<key>`, with an optional workspace folder.
5  */
6 export function get<T>(key: string,
7                        workspaceFolder: vscode.WorkspaceFolder = null,
8                        defaultValue: T = undefined): T {
9   return vscode.workspace.getConfiguration('mlir', workspaceFolder)
10       .get<T>(key, defaultValue);
13 /**
14  *  Sets the config value `mlir.<key>`.
15  */
16 export function update<T>(key: string, value: T,
17                           target?: vscode.ConfigurationTarget) {
18   return vscode.workspace.getConfiguration('mlir').update(key, value, target);