Unblock mainThread and extHost files from being strict null checked

This commit is contained in:
Matt Bierner
2019-02-06 17:54:15 -08:00
parent 946a8750e6
commit 96e13e6cbf
3 changed files with 27 additions and 6 deletions

View File

@@ -103,7 +103,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
private _onDidChangeWorkspace(): void {
const workspace = this._contextService.getWorkbenchState() === WorkbenchState.EMPTY ? null : this._contextService.getWorkspace();
this._proxy.$acceptWorkspaceData(workspace ? {
configuration: workspace.configuration,
configuration: workspace.configuration || undefined,
folders: workspace.folders,
id: workspace.id,
name: this._labelService.getWorkspaceLabel(workspace)
@@ -112,7 +112,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
// --- search ---
$startFileSearch(includePattern: string, _includeFolder: UriComponents, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise<URI[]> {
$startFileSearch(includePattern: string, _includeFolder: UriComponents, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise<URI[]> | undefined {
const includeFolder = URI.revive(_includeFolder);
const workspace = this._contextService.getWorkspace();
if (!workspace.folders.length) {
@@ -196,7 +196,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
});
}
$resolveProxy(url: string): Promise<string> {
$resolveProxy(url: string): Promise<string | undefined> {
return this._windowService.resolveProxy(url);
}
}