Skip to content

Commit

Permalink
review #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Oct 18, 2017
1 parent 7dc8491 commit 11df6eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5387,7 +5387,7 @@ declare module 'vscode' {
/**
* An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.
*/
export const onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
export const onDidChangeConfiguration: Event<ConfigurationChangeEvent>;

/**
* Register a task provider.
Expand All @@ -5399,12 +5399,15 @@ declare module 'vscode' {
export function registerTaskProvider(type: string, provider: TaskProvider): Disposable;
}

export interface IConfigurationChangeEvent {
/**
* An event describing the change in Configuration
*/
export interface ConfigurationChangeEvent {

/**
* Affected configuration keys
*/
affectedKeys: string[];
readonly affectedKeys: string[];

/**
* Returns `true` if the given section for the given resource (if provided) has affected.
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/api/node/extHostConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type ConfigurationInspect<T> = {

export class ExtHostConfiguration implements ExtHostConfigurationShape {

private readonly _onDidChangeConfiguration = new Emitter<vscode.IConfigurationChangeEvent>();
private readonly _onDidChangeConfiguration = new Emitter<vscode.ConfigurationChangeEvent>();
private readonly _proxy: MainThreadConfigurationShape;
private readonly _extHostWorkspace: ExtHostWorkspace;
private _configuration: Configuration;
Expand All @@ -48,7 +48,7 @@ export class ExtHostConfiguration implements ExtHostConfigurationShape {
this._configuration = Configuration.parse(data, extHostWorkspace.workspace);
}

get onDidChangeConfiguration(): Event<vscode.IConfigurationChangeEvent> {
get onDidChangeConfiguration(): Event<vscode.ConfigurationChangeEvent> {
return this._onDidChangeConfiguration && this._onDidChangeConfiguration.event;
}

Expand Down Expand Up @@ -120,7 +120,7 @@ export class ExtHostConfiguration implements ExtHostConfigurationShape {
return <vscode.WorkspaceConfiguration>Object.freeze(result);
}

private toConfigurationChangeEvent(data: IWorkspaceConfigurationChangeEventData): vscode.IConfigurationChangeEvent {
private toConfigurationChangeEvent(data: IWorkspaceConfigurationChangeEventData): vscode.ConfigurationChangeEvent {
const changedConfiguration = new ConfigurationModel(data.changedConfiguration.contents, data.changedConfiguration.keys, data.changedConfiguration.overrides);
const changedConfigurationByResource: StrictResourceMap<ConfigurationModel> = new StrictResourceMap<ConfigurationModel>();
for (const key of Object.keys(data.changedConfigurationByResource)) {
Expand Down

0 comments on commit 11df6eb

Please sign in to comment.