Adding more explicit returns

This commit is contained in:
Matt Bierner
2017-02-01 17:29:57 -08:00
parent 2a82bcdc57
commit c342eaa22e
65 changed files with 124 additions and 55 deletions

View File

@@ -152,6 +152,7 @@ export class MainThreadEditors extends MainThreadEditorsShape {
return workbenchEditor.position;
}
}
return undefined;
}
private _getTextEditorPositionData(): ITextEditorPositionData {
@@ -183,9 +184,8 @@ export class MainThreadEditors extends MainThreadEditorsShape {
};
return this._workbenchEditorService.openEditor(input, position).then(editor => {
if (!editor) {
return;
return undefined;
}
const findEditor = (): string => {
@@ -196,6 +196,7 @@ export class MainThreadEditors extends MainThreadEditorsShape {
return id;
}
}
return undefined;
};
const syncEditorId = findEditor();
@@ -238,6 +239,7 @@ export class MainThreadEditors extends MainThreadEditorsShape {
options: { preserveFocus: false }
}, position).then(() => { return; });
}
return undefined;
}
$tryHideEditor(id: string): TPromise<void> {
@@ -253,6 +255,7 @@ export class MainThreadEditors extends MainThreadEditorsShape {
}
}
}
return undefined;
}
$trySetSelections(id: string, selections: ISelection[]): TPromise<any> {
@@ -276,6 +279,7 @@ export class MainThreadEditors extends MainThreadEditorsShape {
return TPromise.wrapError('TextEditor disposed');
}
this._textEditorsMap[id].revealRange(range, revealType);
return undefined;
}
$trySetOptions(id: string, options: ITextEditorConfigurationUpdate): TPromise<any> {