mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
eng - some extHost strict-null work
This commit is contained in:
@@ -321,10 +321,10 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
|
||||
return folders[0].uri.fsPath;
|
||||
}
|
||||
|
||||
getRelativePath(pathOrUri: string | vscode.Uri, includeWorkspace?: boolean): string | undefined {
|
||||
getRelativePath(pathOrUri: string | vscode.Uri, includeWorkspace?: boolean): string {
|
||||
|
||||
let resource: URI | undefined;
|
||||
let path: string | undefined;
|
||||
let path: string = '';
|
||||
if (typeof pathOrUri === 'string') {
|
||||
resource = URI.file(pathOrUri);
|
||||
path = pathOrUri;
|
||||
@@ -354,7 +354,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
|
||||
if (includeWorkspace && folder.name) {
|
||||
result = `${folder.name}/${result}`;
|
||||
}
|
||||
return result;
|
||||
return result!;
|
||||
}
|
||||
|
||||
private trySetWorkspaceFolders(folders: vscode.WorkspaceFolder[]): void {
|
||||
|
||||
Reference in New Issue
Block a user