mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 00:44:05 +01:00
config - add method to get known configuration keys
This commit is contained in:
@@ -175,4 +175,17 @@ export function flatten(contents: any): any {
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
export function getConfigurationKeys(): string[] {
|
||||
const keys: string[] = [];
|
||||
|
||||
const configurations = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurations();
|
||||
configurations.forEach(config => {
|
||||
if (config.properties) {
|
||||
keys.push(...Object.keys(config.properties));
|
||||
}
|
||||
});
|
||||
|
||||
return keys;
|
||||
}
|
||||
Reference in New Issue
Block a user