eng - some extHost strict-null work

This commit is contained in:
Johannes Rieken
2019-03-06 15:36:56 +01:00
parent 95e877dbcf
commit 763ae0943d
5 changed files with 7 additions and 7 deletions

View File

@@ -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 {