Add override keyword in codebase (#120755)

For #120675

This uses a script to add the override keyword to places that need it in the codebase

Note that we can't enable the --noImplicitOverride setting yet since there are still around 200 errors that require further attention
This commit is contained in:
Matt Bierner
2021-04-08 10:05:20 -07:00
committed by GitHub
parent 604b950f0d
commit e1f0f8f513
541 changed files with 1965 additions and 1965 deletions

View File

@@ -27,7 +27,7 @@ import { createCancelablePromise, firstParallel } from 'vs/base/common/async';
export class ExtHostDebugService extends ExtHostDebugServiceBase {
readonly _serviceBrand: undefined;
override readonly _serviceBrand: undefined;
private _integratedTerminalInstances = new DebugTerminalCollection();
private _terminalDisposedListener: IDisposable | undefined;
@@ -43,7 +43,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
super(extHostRpcService, workspaceService, extensionService, editorsService, configurationService);
}
protected createDebugAdapter(adapter: IAdapterDescriptor, session: ExtHostDebugSession): AbstractDebugAdapter | undefined {
protected override createDebugAdapter(adapter: IAdapterDescriptor, session: ExtHostDebugSession): AbstractDebugAdapter | undefined {
switch (adapter.type) {
case 'server':
return new SocketDebugAdapter(adapter);
@@ -55,7 +55,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
return super.createDebugAdapter(adapter, session);
}
protected daExecutableFromPackage(session: ExtHostDebugSession, extensionRegistry: ExtensionDescriptionRegistry): DebugAdapterExecutable | undefined {
protected override daExecutableFromPackage(session: ExtHostDebugSession, extensionRegistry: ExtensionDescriptionRegistry): DebugAdapterExecutable | undefined {
const dae = ExecutableDebugAdapter.platformAdapterExecutable(extensionRegistry.getAllExtensionDescriptions(), session.type);
if (dae) {
return new DebugAdapterExecutable(dae.command, dae.args, dae.options);
@@ -63,11 +63,11 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
return undefined;
}
protected createSignService(): ISignService | undefined {
protected override createSignService(): ISignService | undefined {
return new SignService();
}
public async $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, sessionId: string): Promise<number | undefined> {
public async override $runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, sessionId: string): Promise<number | undefined> {
if (args.kind === 'integrated') {

View File

@@ -47,23 +47,23 @@ export class ExtHostOutputChannelBackedByFile extends AbstractExtHostOutputChann
this._appender = appender;
}
append(value: string): void {
override append(value: string): void {
super.append(value);
this._appender.append(value);
this._onDidAppend.fire();
}
update(): void {
override update(): void {
this._appender.flush();
super.update();
}
show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void {
override show(columnOrPreserveFocus?: vscode.ViewColumn | boolean, preserveFocus?: boolean): void {
this._appender.flush();
super.show(columnOrPreserveFocus, preserveFocus);
}
clear(): void {
override clear(): void {
this._appender.flush();
super.clear();
}
@@ -85,7 +85,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService {
this._logsLocation = initData.logsLocation;
}
$setVisibleChannel(channelId: string): void {
override $setVisibleChannel(channelId: string): void {
if (channelId) {
const channel = this._channels.get(channelId);
if (channel) {
@@ -94,7 +94,7 @@ export class ExtHostOutputService2 extends ExtHostOutputService {
}
}
createOutputChannel(name: string): vscode.OutputChannel {
override createOutputChannel(name: string): vscode.OutputChannel {
name = name.trim();
if (!name) {
throw new Error('illegal argument `name`. must not be falsy');

View File

@@ -59,7 +59,7 @@ export class NativeExtHostSearch extends ExtHostSearch {
});
}
$provideFileSearchResults(handle: number, session: number, rawQuery: IRawFileQuery, token: vscode.CancellationToken): Promise<ISearchCompleteStats> {
override $provideFileSearchResults(handle: number, session: number, rawQuery: IRawFileQuery, token: vscode.CancellationToken): Promise<ISearchCompleteStats> {
const query = reviveQuery(rawQuery);
if (handle === this._internalFileSearchHandle) {
return this.doInternalFileSearch(handle, session, query, token);
@@ -91,7 +91,7 @@ export class NativeExtHostSearch extends ExtHostSearch {
return <Promise<ISearchCompleteStats>>this._internalFileSearchProvider.doFileSearch(rawQuery, onResult, token);
}
$clearCache(cacheKey: string): Promise<void> {
override $clearCache(cacheKey: string): Promise<void> {
if (this._internalFileSearchProvider) {
this._internalFileSearchProvider.clearCache(cacheKey);
}
@@ -99,7 +99,7 @@ export class NativeExtHostSearch extends ExtHostSearch {
return super.$clearCache(cacheKey);
}
protected createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager {
protected override createTextSearchManager(query: ITextQuery, provider: vscode.TextSearchProvider): TextSearchManager {
return new NativeTextSearchManager(query, provider);
}
}