strict null check contrib/editorReplace and services/queryEditor (#12166)

This commit is contained in:
Anthony Dresser
2020-09-08 14:06:43 -07:00
committed by GitHub
parent 7231df34ce
commit d9b4af1217
8 changed files with 21 additions and 22 deletions

View File

@@ -120,7 +120,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
public get state(): QueryEditorState { return this._state; }
constructor(
private _description: string,
private _description: string | undefined,
protected _text: AbstractTextResourceEditorInput,
protected _results: QueryResultsInput,
@IConnectionManagementService private readonly connectionManagementService: IConnectionManagementService,
@@ -173,7 +173,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
public get text(): AbstractTextResourceEditorInput { return this._text; }
public get results(): QueryResultsInput { return this._results; }
// Description is shown beside the tab name in the combobox of open editors
public getDescription(): string { return this._description; }
public getDescription(): string | undefined { return this._description; }
public supportsSplitEditor(): boolean { return false; }
public revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void> {
return this._text.revert(group, options);

View File

@@ -19,7 +19,7 @@ export class UntitledQueryEditorInput extends QueryEditorInput implements IEncod
public static readonly ID = 'workbench.editorInput.untitledQueryInput';
constructor(
description: string,
description: string | undefined,
text: UntitledTextEditorInput,
results: QueryResultsInput,
@IConnectionManagementService connectionManagementService: IConnectionManagementService,