提交 96e13e6c 编写于 作者: M Matt Bierner

Unblock mainThread and extHost files from being strict null checked

上级 946a8750
......@@ -397,9 +397,30 @@
"./vs/vscode.proposed.d.ts",
"./vs/workbench/api/common/configurationExtensionPoint.ts",
"./vs/workbench/api/common/menusExtensionPoint.ts",
"./vs/workbench/api/electron-browser/extHostCustomers.ts",
"./vs/workbench/api/electron-browser/mainThreadClipboard.ts",
"./vs/workbench/api/electron-browser/mainThreadCommands.ts",
"./vs/workbench/api/electron-browser/mainThreadErrors.ts",
"./vs/workbench/api/electron-browser/mainThreadFileSystem.ts",
"./vs/workbench/api/electron-browser/mainThreadLanguages.ts",
"./vs/workbench/api/electron-browser/mainThreadLogService.ts",
"./vs/workbench/api/electron-browser/mainThreadStatusBar.ts",
"./vs/workbench/api/electron-browser/mainThreadTelemetry.ts",
"./vs/workbench/api/electron-browser/mainThreadUrls.ts",
"./vs/workbench/api/electron-browser/mainThreadWindow.ts",
"./vs/workbench/api/electron-browser/mainThreadWorkspace.ts",
"./vs/workbench/api/node/extHost.protocol.ts",
"./vs/workbench/api/node/extHostClipboard.ts",
"./vs/workbench/api/node/extHostDialogs.ts",
"./vs/workbench/api/node/extHostExtensionActivator.ts",
"./vs/workbench/api/node/extHostHeapService.ts",
"./vs/workbench/api/node/extHostLogService.ts",
"./vs/workbench/api/node/extHostMessageService.ts",
"./vs/workbench/api/node/extHostSearch.fileIndex.ts",
"./vs/workbench/api/node/extHostStorage.ts",
"./vs/workbench/api/node/extHostTypes.ts",
"./vs/workbench/api/node/extHostUrls.ts",
"./vs/workbench/api/node/extHostWindow.ts",
"./vs/workbench/api/shared/editor.ts",
"./vs/workbench/api/shared/tasks.ts",
"./vs/workbench/browser/actions.ts",
......
......@@ -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);
}
}
......
......@@ -505,12 +505,12 @@ export interface ExtHostUrlsShape {
}
export interface MainThreadWorkspaceShape extends IDisposable {
$startFileSearch(includePattern: string, includeFolder: URI, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise<UriComponents[]>;
$startFileSearch(includePattern: string, includeFolder: URI, excludePatternOrDisregardExcludes: string | false, maxResults: number, token: CancellationToken): Promise<UriComponents[]> | undefined;
$startTextSearch(query: IPatternInfo, options: ITextQueryBuilderOptions, requestId: number, token: CancellationToken): Promise<vscode.TextSearchComplete>;
$checkExists(includes: string[], token: CancellationToken): Promise<boolean>;
$saveAll(includeUntitled?: boolean): Promise<boolean>;
$updateWorkspaceFolders(extensionName: string, index: number, deleteCount: number, workspaceFoldersToAdd: { uri: UriComponents, name?: string }[]): Promise<void>;
$resolveProxy(url: string): Promise<string>;
$resolveProxy(url: string): Promise<string | undefined>;
}
export interface IFileChangeDto {
......@@ -718,7 +718,7 @@ export interface ExtHostTreeViewsShape {
}
export interface ExtHostWorkspaceShape {
$acceptWorkspaceData(workspace: IWorkspaceData): void;
$acceptWorkspaceData(workspace: IWorkspaceData | null): void;
$handleTextSearchResult(result: IRawFileMatch2, requestId: number): void;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册