mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
No unused locals (#8231)
* add no unused local * fix strict null * fix compile errors * update vscode comments
This commit is contained in:
@@ -72,7 +72,6 @@ export class MainThreadModelView extends Disposable implements MainThreadModelVi
|
||||
}
|
||||
|
||||
$registerEvent(handle: number, componentId: string): Thenable<void> {
|
||||
let properties: { [key: string]: any; } = { eventName: this.onEvent };
|
||||
return this.execModelViewAction(handle, (modelView) => {
|
||||
this._register(modelView.onEvent(e => {
|
||||
if (e.componentId && e.componentId === componentId) {
|
||||
|
||||
@@ -16,7 +16,6 @@ import { ModelViewInput, ModelViewInputModel, ModeViewSaveHandler } from 'sql/wo
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@extHostNamedCustomer(SqlMainContext.MainThreadModelViewDialog)
|
||||
export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape {
|
||||
@@ -33,8 +32,7 @@ export class MainThreadModelViewDialog implements MainThreadModelViewDialogShape
|
||||
constructor(
|
||||
context: IExtHostContext,
|
||||
@IInstantiationService private _instatiationService: IInstantiationService,
|
||||
@IEditorService private _editorService: IEditorService,
|
||||
@ITelemetryService private _telemetryService: ITelemetryService
|
||||
@IEditorService private _editorService: IEditorService
|
||||
) {
|
||||
this._proxy = context.getProxy(SqlExtHostContext.ExtHostModelViewDialog);
|
||||
this._dialogService = new CustomDialogService(_instatiationService);
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ExtHostDashboardShape, MainThreadDashboardShape, SqlMainContext } from './sqlExtHost.protocol';
|
||||
import { ExtHostDashboardShape } from './sqlExtHost.protocol';
|
||||
|
||||
export class ExtHostDashboard implements ExtHostDashboardShape {
|
||||
private _onDidOpenDashboard = new Emitter<azdata.DashboardDocument>();
|
||||
@@ -17,10 +17,7 @@ export class ExtHostDashboard implements ExtHostDashboardShape {
|
||||
private _onDidChangeToDashboard = new Emitter<azdata.DashboardDocument>();
|
||||
public readonly onDidChangeToDashboard: Event<azdata.DashboardDocument> = this._onDidChangeToDashboard.event;
|
||||
|
||||
private _proxy: MainThreadDashboardShape;
|
||||
|
||||
constructor(mainContext: IMainContext) {
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadDashboard);
|
||||
}
|
||||
|
||||
$onDidOpenDashboard(dashboard: azdata.DashboardDocument) {
|
||||
|
||||
@@ -24,7 +24,6 @@ class ModelBuilderImpl implements azdata.ModelBuilder {
|
||||
constructor(
|
||||
private readonly _proxy: MainThreadModelViewShape,
|
||||
private readonly _handle: number,
|
||||
private readonly _mainContext: IMainContext,
|
||||
private readonly _extHostModelViewTree: ExtHostModelViewTreeViewsShape,
|
||||
private readonly _extension: IExtensionDescription
|
||||
) {
|
||||
@@ -742,14 +741,6 @@ class ComponentWithIconWrapper extends ComponentWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
class ContainerWrapper<T, U> extends ComponentWrapper implements azdata.Container<T, U> {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, type: ModelComponentTypes, id: string) {
|
||||
super(proxy, handle, type, id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CardWrapper extends ComponentWrapper implements azdata.CardComponent {
|
||||
|
||||
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
|
||||
@@ -1580,11 +1571,10 @@ class ModelViewImpl implements azdata.ModelView {
|
||||
private readonly _handle: number,
|
||||
private readonly _connection: azdata.connection.Connection,
|
||||
private readonly _serverInfo: azdata.ServerInfo,
|
||||
private readonly mainContext: IMainContext,
|
||||
private readonly _extHostModelViewTree: ExtHostModelViewTreeViewsShape,
|
||||
_extension: IExtensionDescription
|
||||
) {
|
||||
this._modelBuilder = new ModelBuilderImpl(this._proxy, this._handle, this.mainContext, this._extHostModelViewTree, _extension);
|
||||
this._modelBuilder = new ModelBuilderImpl(this._proxy, this._handle, this._extHostModelViewTree, _extension);
|
||||
}
|
||||
|
||||
public get onClosed(): vscode.Event<any> {
|
||||
@@ -1637,7 +1627,7 @@ export class ExtHostModelView implements ExtHostModelViewShape {
|
||||
private readonly _handlers = new Map<string, (view: azdata.ModelView) => void>();
|
||||
private readonly _handlerToExtension = new Map<string, IExtensionDescription>();
|
||||
constructor(
|
||||
private _mainContext: IMainContext,
|
||||
_mainContext: IMainContext,
|
||||
private _extHostModelViewTree: ExtHostModelViewTreeViewsShape
|
||||
) {
|
||||
this._proxy = _mainContext.getProxy(SqlMainContext.MainThreadModelView);
|
||||
@@ -1657,7 +1647,7 @@ export class ExtHostModelView implements ExtHostModelViewShape {
|
||||
|
||||
$registerWidget(handle: number, id: string, connection: azdata.connection.Connection, serverInfo: azdata.ServerInfo): void {
|
||||
let extension = this._handlerToExtension.get(id);
|
||||
let view = new ModelViewImpl(this._proxy, handle, connection, serverInfo, this._mainContext, this._extHostModelViewTree, extension);
|
||||
let view = new ModelViewImpl(this._proxy, handle, connection, serverInfo, this._extHostModelViewTree, extension);
|
||||
this._modelViews.set(handle, view);
|
||||
this._handlers.get(id)(view);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user