本文整理匯總了TypeScript中vscode.WorkspaceConfiguration.inspect方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript WorkspaceConfiguration.inspect方法的具體用法?TypeScript WorkspaceConfiguration.inspect怎麽用?TypeScript WorkspaceConfiguration.inspect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vscode.WorkspaceConfiguration
的用法示例。
在下文中一共展示了WorkspaceConfiguration.inspect方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getConfigNoDefault
export function getConfigNoDefault(config: WorkspaceConfiguration, key: string): any {
let x = config.inspect(key);
var value = x.workspaceFolderValue;
if (value === undefined)
value = x.workspaceValue;
if (value === undefined)
value = x.globalValue;
return value;
}
示例2: runPubGetOnPubspecChangesIsConfiguredExplicitly
get runPubGetOnPubspecChangesIsConfiguredExplicitly() {
const runPubGet = this.config.inspect("runPubGetOnPubspecChanges");
// Return whether any of them are explicitly set, in which case we'll then read normally from the settings.
return runPubGet && (runPubGet.globalValue !== undefined || runPubGet.workspaceValue !== undefined || runPubGet.workspaceFolderValue !== undefined);
}