Return void instead of comment from editComment, fixes #59460

This commit is contained in:
Rachel Macfarlane
2018-09-26 14:38:53 -07:00
parent 9906ecc7a5
commit b4f4f55f5a
6 changed files with 13 additions and 11 deletions

View File

@@ -1002,7 +1002,7 @@ export interface ExtHostCommentsShape {
$provideDocumentComments(handle: number, document: UriComponents): Thenable<modes.CommentInfo>;
$createNewCommentThread(handle: number, document: UriComponents, range: IRange, text: string): Thenable<modes.CommentThread>;
$replyToCommentThread(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Thenable<modes.CommentThread>;
$editComment(handle: number, document: UriComponents, comment: modes.Comment, text: string): Thenable<modes.Comment>;
$editComment(handle: number, document: UriComponents, comment: modes.Comment, text: string): Thenable<void>;
$deleteComment(handle: number, document: UriComponents, comment: modes.Comment): Thenable<void>;
$provideWorkspaceComments(handle: number): Thenable<modes.CommentThread[]>;
}

View File

@@ -93,7 +93,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
}).then(commentThread => commentThread ? convertToCommentThread(provider, commentThread, this._commandsConverter) : null);
}
$editComment(handle: number, uri: UriComponents, comment: modes.Comment, text: string): Thenable<modes.Comment> {
$editComment(handle: number, uri: UriComponents, comment: modes.Comment, text: string): Thenable<void> {
const data = this._documents.getDocumentData(URI.revive(uri));
if (!data || !data.document) {
@@ -103,7 +103,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
const provider = this._documentProviders.get(handle);
return asThenable(() => {
return provider.editComment(data.document, convertFromComment(comment), text, CancellationToken.None);
}).then(comment => convertToComment(provider, comment, this._commandsConverter));
});
}
$deleteComment(handle: number, uri: UriComponents, comment: modes.Comment): Thenable<void> {