Skip to content

Commit 1609b01

Browse files
committed
Migrate from TPromise
1 parent c9cf18e commit 1609b01

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
77
import { IProgressStep } from 'vs/platform/progress/common/progress';
88
import { Event } from 'vs/base/common/event';
9-
import { TPromise } from 'vs/base/common/winjs.base';
109

1110
export const IRemoteAuthorityResolverService = createDecorator<IRemoteAuthorityResolverService>('remoteAuthorityResolverService');
1211

@@ -27,9 +26,9 @@ export interface IRemoteAuthorityResolverService {
2726

2827
onResolvingProgress: Event<IResolvingProgressEvent>;
2928

30-
resolveAuthority(authority: string): TPromise<ResolvedAuthority>;
29+
resolveAuthority(authority: string): Thenable<ResolvedAuthority>;
3130

32-
getLabel(authority: string): TPromise<string | null>;
31+
getLabel(authority: string): Thenable<string | null>;
3332
}
3433

3534
export interface IRemoteAuthorityResolver {

src/vs/platform/remote/node/remoteAuthorityResolverChannel.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,27 @@ export class RemoteAuthorityResolverChannelClient implements IRemoteAuthorityRes
4848

4949
_serviceBrand: any;
5050

51-
private _resolveAuthorityCache: { [authority: string]: TPromise<ResolvedAuthority>; };
51+
private _resolveAuthorityCache: { [authority: string]: Thenable<ResolvedAuthority>; };
5252
get onResolvingProgress(): Event<IResolvingProgressEvent> { return buffer(this.channel.listen('onResolvingProgress'), true); }
5353

5454
constructor(private channel: IRemoteAuthorityResolverChannel) {
5555
this._resolveAuthorityCache = Object.create(null);
5656
}
5757

58-
resolveAuthority(authority: string): TPromise<ResolvedAuthority> {
58+
resolveAuthority(authority: string): Thenable<ResolvedAuthority> {
5959
if (!this._resolveAuthorityCache[authority]) {
6060
this._resolveAuthorityCache[authority] = this._resolveAuthority(authority);
6161
}
6262
return this._resolveAuthorityCache[authority];
6363
}
6464

65-
getLabel(authority: string): TPromise<string | null> {
65+
getLabel(authority: string): Thenable<string | null> {
6666
return this.channel.call('getLabel', [authority]);
6767
}
6868

69-
private _resolveAuthority(authority: string): TPromise<ResolvedAuthority> {
69+
private _resolveAuthority(authority: string): Thenable<ResolvedAuthority> {
7070
if (authority.indexOf('+') >= 0) {
71-
return TPromise.wrap(this.channel.call('resolveAuthority', [authority]));
71+
return this.channel.call('resolveAuthority', [authority]);
7272
} else {
7373
const [host, strPort] = authority.split(':');
7474
const port = parseInt(strPort, 10);

0 commit comments

Comments
 (0)