@theia/plugin 1.29.0-next.1 → 1.29.0-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/theia.d.ts +7 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.29.0-next.1+56190e693b7",
3
+ "version": "1.29.0-next.6+7e177f92c6d",
4
4
  "description": "Theia - Plugin API",
5
5
  "types": "./src/theia.d.ts",
6
6
  "publishConfig": {
@@ -32,5 +32,5 @@
32
32
  "nyc": {
33
33
  "extends": "../../configs/nyc.json"
34
34
  },
35
- "gitHead": "56190e693b73f93cd05c428678895316e8d47c46"
35
+ "gitHead": "7e177f92c6d3f32dbc876d25ec380bd403e13858"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -5640,12 +5640,14 @@ export module '@theia/plugin' {
5640
5640
  * Returns `true` if the given section for the given resource (if provided) is affected.
5641
5641
  *
5642
5642
  * @param section Configuration name, supports _dotted_ names.
5643
- * @param resource A resource Uri.
5643
+ * @param scope a {@link ConfigurationScope}
5644
5644
  * @return `true` if the given section for the given resource (if provided) is affected.
5645
5645
  */
5646
- affectsConfiguration(section: string, resource?: Uri): boolean;
5646
+ affectsConfiguration(section: string, scope?: ConfigurationScope): boolean;
5647
5647
  }
5648
5648
 
5649
+ export type ConfigurationScope = Uri | WorkspaceFolder | TextDocument | { uri?: Uri, languageId: string };
5650
+
5649
5651
  /**
5650
5652
  * An event describing a change to the set of [workspace folders](#workspace.workspaceFolders).
5651
5653
  */
@@ -6300,13 +6302,13 @@ export module '@theia/plugin' {
6300
6302
  * is returned. Dots in the section-identifier are interpreted as child-access,
6301
6303
  * like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`.
6302
6304
  *
6303
- * When a resource is provided, configuration scoped to that resource is returned.
6305
+ * When a scope is provided configuration confined to that scope is returned. Scope can be a resource or a language identifier or both.
6304
6306
  *
6305
6307
  * @param section A dot-separated identifier.
6306
- * @param resource A resource for which the configuration is asked for
6308
+ * @param scope A scope for which the configuration is asked for.
6307
6309
  * @return The full configuration or a subset.
6308
6310
  */
6309
- export function getConfiguration(section?: string, resource?: Uri | null): WorkspaceConfiguration;
6311
+ export function getConfiguration(section?: string, scope?: ConfigurationScope | null): WorkspaceConfiguration;
6310
6312
 
6311
6313
  /**
6312
6314
  * An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.