mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
debt - remove TPromise from ExtHostQuickOpenShape#$validateInput
This commit is contained in:
@@ -854,7 +854,7 @@ export interface ExtHostLanguageFeaturesShape {
|
||||
|
||||
export interface ExtHostQuickOpenShape {
|
||||
$onItemSelected(handle: number): void;
|
||||
$validateInput(input: string): TPromise<string>;
|
||||
$validateInput(input: string): Thenable<string>;
|
||||
$onDidChangeActive(sessionId: number, handles: number[]): void;
|
||||
$onDidChangeSelection(sessionId: number, handles: number[]): void;
|
||||
$onDidAccept(sessionId: number): void;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { asWinJsPromise, wireCancellationToken } from 'vs/base/common/async';
|
||||
import { wireCancellationToken, asThenable } from 'vs/base/common/async';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
@@ -134,9 +134,9 @@ export class ExtHostQuickOpen implements ExtHostQuickOpenShape {
|
||||
return wireCancellationToken(token, promise, true);
|
||||
}
|
||||
|
||||
$validateInput(input: string): TPromise<string> {
|
||||
$validateInput(input: string): Thenable<string> {
|
||||
if (this._validateInput) {
|
||||
return asWinJsPromise(_ => this._validateInput(input));
|
||||
return asThenable(() => this._validateInput(input));
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
@@ -591,4 +591,4 @@ class ExtHostInputBox extends ExtHostQuickInput implements InputBox {
|
||||
this._validationMessage = validationMessage;
|
||||
this.update({ validationMessage });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user