Fix strictFunctionTypes errors in terminal proxy

Part of #81574
This commit is contained in:
Daniel Imms
2019-10-04 17:38:34 -07:00
parent a0c6566f87
commit 7f5a4a3f5b
7 changed files with 24 additions and 18 deletions

View File

@@ -123,7 +123,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders || [], this._extHostDocumentsAndEditors, configProvider);
}
public async $spawnExtHostProcess(id: number, shellLaunchConfigDto: IShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<void> {
public async $spawnExtHostProcess(id: number, shellLaunchConfigDto: IShellLaunchConfigDto, activeWorkspaceRootUriComponents: UriComponents | undefined, cols: number, rows: number, isWorkspaceShellAllowed: boolean): Promise<void> {
const shellLaunchConfig: IShellLaunchConfig = {
name: shellLaunchConfigDto.name,
executable: shellLaunchConfigDto.executable,
@@ -155,17 +155,23 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
}
}
const activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
// Get the environment
const apiLastActiveWorkspace = await this._extHostWorkspace.getWorkspaceFolder(activeWorkspaceRootUri);
const lastActiveWorkspace = apiLastActiveWorkspace ? {
uri: apiLastActiveWorkspace.uri,
name: apiLastActiveWorkspace.name,
index: apiLastActiveWorkspace.index,
toResource: () => {
throw new Error('Not implemented');
let lastActiveWorkspace: IWorkspaceFolder | null = null;
let activeWorkspaceRootUri: URI | undefined;
if (activeWorkspaceRootUriComponents) {
let activeWorkspaceRootUri = URI.revive(activeWorkspaceRootUriComponents);
// Get the environment
const apiLastActiveWorkspace = await this._extHostWorkspace.getWorkspaceFolder(activeWorkspaceRootUri);
if (apiLastActiveWorkspace) {
lastActiveWorkspace = {
uri: apiLastActiveWorkspace.uri,
name: apiLastActiveWorkspace.name,
index: apiLastActiveWorkspace.index,
toResource: () => {
throw new Error('Not implemented');
}
};
}
} as IWorkspaceFolder : null;
}
// Get the initial cwd
const terminalConfig = configProvider.getConfiguration('terminal.integrated');