mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
debt - More precise typings
This commit is contained in:
@@ -405,8 +405,8 @@ export interface TransferInputBox extends BaseTransferQuickInput {
|
||||
|
||||
export interface MainThreadQuickOpenShape extends IDisposable {
|
||||
$show(options: IPickOptions<TransferQuickPickItems>, token: CancellationToken): Thenable<number | number[]>;
|
||||
$setItems(items: TransferQuickPickItems[]): Thenable<any>;
|
||||
$setError(error: Error): Thenable<any>;
|
||||
$setItems(items: TransferQuickPickItems[]): Thenable<void>;
|
||||
$setError(error: Error): Thenable<void>;
|
||||
$input(options: vscode.InputBoxOptions, validateInput: boolean): TPromise<string>;
|
||||
$createOrUpdate(params: TransferQuickInput): Thenable<void>;
|
||||
$dispose(id: number): Thenable<void>;
|
||||
@@ -577,12 +577,12 @@ export interface MainThreadDebugServiceShape extends IDisposable {
|
||||
$acceptDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
|
||||
$acceptDAError(handle: number, name: string, message: string, stack: string): void;
|
||||
$acceptDAExit(handle: number, code: number, signal: string): void;
|
||||
$registerDebugConfigurationProvider(type: string, hasProvideMethod: boolean, hasResolveMethod: boolean, hasDebugAdapterExecutable: boolean, handle: number): Thenable<any>;
|
||||
$unregisterDebugConfigurationProvider(handle: number): Thenable<any>;
|
||||
$registerDebugConfigurationProvider(type: string, hasProvideMethod: boolean, hasResolveMethod: boolean, hasDebugAdapterExecutable: boolean, handle: number): Thenable<void>;
|
||||
$unregisterDebugConfigurationProvider(handle: number): Thenable<void>;
|
||||
$startDebugging(folder: UriComponents | undefined, nameOrConfig: string | vscode.DebugConfiguration): Thenable<boolean>;
|
||||
$customDebugAdapterRequest(id: DebugSessionUUID, command: string, args: any): Thenable<any>;
|
||||
$appendDebugConsole(value: string): Thenable<any>;
|
||||
$startBreakpointEvents(): Thenable<any>;
|
||||
$appendDebugConsole(value: string): Thenable<void>;
|
||||
$startBreakpointEvents(): Thenable<void>;
|
||||
$registerBreakpoints(breakpoints: (ISourceMultiBreakpointDto | IFunctionBreakpointDto)[]): Thenable<void>;
|
||||
$unregisterBreakpoints(breakpointIds: string[], functionBreakpointIds: string[]): Thenable<void>;
|
||||
}
|
||||
@@ -888,7 +888,7 @@ export interface ExtHostTerminalServiceShape {
|
||||
|
||||
export interface ExtHostSCMShape {
|
||||
$provideOriginalResource(sourceControlHandle: number, uri: UriComponents): TPromise<UriComponents>;
|
||||
$onInputBoxValueChange(sourceControlHandle: number, value: string): Thenable<void>;
|
||||
$onInputBoxValueChange(sourceControlHandle: number, value: string): void;
|
||||
$executeResourceCommand(sourceControlHandle: number, groupHandle: number, handle: number): TPromise<void>;
|
||||
$validateInput(sourceControlHandle: number, value: string, cursorPosition: number): TPromise<[string, number] | undefined>;
|
||||
$setSelectedSourceControls(selectedSourceControlHandles: number[]): Thenable<void>;
|
||||
|
||||
@@ -64,7 +64,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
};
|
||||
}
|
||||
|
||||
$createNewCommentThread(handle: number, uri: UriComponents, range: IRange, text: string): TPromise<modes.CommentThread> {
|
||||
$createNewCommentThread(handle: number, uri: UriComponents, range: IRange, text: string): Thenable<modes.CommentThread> {
|
||||
const data = this._documents.getDocumentData(URI.revive(uri));
|
||||
const ran = <vscode.Range>extHostTypeConverter.Range.to(range);
|
||||
|
||||
@@ -78,7 +78,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
}).then(commentThread => commentThread ? convertToCommentThread(commentThread, this._commandsConverter) : null);
|
||||
}
|
||||
|
||||
$replyToCommentThread(handle: number, uri: UriComponents, range: IRange, thread: modes.CommentThread, text: string): TPromise<modes.CommentThread> {
|
||||
$replyToCommentThread(handle: number, uri: UriComponents, range: IRange, thread: modes.CommentThread, text: string): Thenable<modes.CommentThread> {
|
||||
const data = this._documents.getDocumentData(URI.revive(uri));
|
||||
const ran = <vscode.Range>extHostTypeConverter.Range.to(range);
|
||||
|
||||
@@ -92,7 +92,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
}).then(commentThread => commentThread ? convertToCommentThread(commentThread, this._commandsConverter) : null);
|
||||
}
|
||||
|
||||
$provideDocumentComments(handle: number, uri: UriComponents): TPromise<modes.CommentInfo> {
|
||||
$provideDocumentComments(handle: number, uri: UriComponents): Thenable<modes.CommentInfo> {
|
||||
const data = this._documents.getDocumentData(URI.revive(uri));
|
||||
if (!data || !data.document) {
|
||||
return TPromise.as(null);
|
||||
@@ -105,7 +105,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
.then(commentInfo => commentInfo ? convertCommentInfo(handle, commentInfo, this._commandsConverter) : null);
|
||||
}
|
||||
|
||||
$provideWorkspaceComments(handle: number): TPromise<modes.CommentThread[]> {
|
||||
$provideWorkspaceComments(handle: number): Thenable<modes.CommentThread[]> {
|
||||
const provider = this._workspaceProviders.get(handle);
|
||||
if (!provider) {
|
||||
return TPromise.as(null);
|
||||
|
||||
@@ -402,7 +402,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
|
||||
// -- called by main thread
|
||||
|
||||
public $activateByEvent(activationEvent: string): TPromise<void> {
|
||||
public $activateByEvent(activationEvent: string): Thenable<void> {
|
||||
return this.activateByEvent(activationEvent, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ export class ExtHostSCM implements ExtHostSCMShape {
|
||||
});
|
||||
}
|
||||
|
||||
$setSelectedSourceControls(selectedSourceControlHandles: number[]): TPromise<void> {
|
||||
$setSelectedSourceControls(selectedSourceControlHandles: number[]): Thenable<void> {
|
||||
this.logService.trace('ExtHostSCM#$setSelectedSourceControls', selectedSourceControlHandles);
|
||||
|
||||
const set = new Set<number>();
|
||||
|
||||
Reference in New Issue
Block a user