Skip to content

Commit

Permalink
improve getRemoteName signature
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Feb 19, 2020
1 parent e3d78d5 commit e346071
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/platform/remote/common/remoteHosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export function getRemoteAuthority(uri: URI): string | undefined {
return uri.scheme === REMOTE_HOST_SCHEME ? uri.authority : undefined;
}

export function getRemoteName(authority: string): string;
export function getRemoteName(authority: undefined): undefined;
export function getRemoteName(authority: string | undefined): string | undefined;
export function getRemoteName(authority: string | undefined): string | undefined {
if (!authority) {
return undefined;
Expand All @@ -22,4 +25,4 @@ export function getRemoteName(authority: string | undefined): string | undefined
return authority;
}
return authority.substr(0, pos);
}
}

0 comments on commit e346071

Please sign in to comment.