Skip to content

Commit e346071

Browse files
committed
improve getRemoteName signature
1 parent e3d78d5 commit e346071

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/vs/platform/remote/common/remoteHosts.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export function getRemoteAuthority(uri: URI): string | undefined {
1212
return uri.scheme === REMOTE_HOST_SCHEME ? uri.authority : undefined;
1313
}
1414

15+
export function getRemoteName(authority: string): string;
16+
export function getRemoteName(authority: undefined): undefined;
17+
export function getRemoteName(authority: string | undefined): string | undefined;
1518
export function getRemoteName(authority: string | undefined): string | undefined {
1619
if (!authority) {
1720
return undefined;
@@ -22,4 +25,4 @@ export function getRemoteName(authority: string | undefined): string | undefined
2225
return authority;
2326
}
2427
return authority.substr(0, pos);
25-
}
28+
}

0 commit comments

Comments
 (0)