Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts
3290 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
declare module 'vscode' {
7
8
// @alexr00 https://github.com/microsoft/vscode/issues/207402
9
10
export enum CommentThreadApplicability {
11
Current = 0,
12
Outdated = 1
13
}
14
15
export interface CommentThread2 {
16
/* @api this is a bit weird for the extension now. The CommentThread is a managed object, which means it listens
17
* to when it's properties are set, but not if it's properties are modified. This means that this will not work to update the resolved state
18
*
19
* thread.state.resolved = CommentThreadState.Resolved;
20
*
21
* but this will work
22
*
23
* thread.state = {
24
* resolved: CommentThreadState.Resolved
25
* applicability: thread.state.applicability
26
* };
27
*
28
* Worth noting that we already have this problem for the `comments` property.
29
*/
30
state?: CommentThreadState | { resolved?: CommentThreadState; applicability?: CommentThreadApplicability };
31
readonly uri: Uri;
32
range: Range | undefined;
33
comments: readonly Comment[];
34
collapsibleState: CommentThreadCollapsibleState;
35
canReply: boolean | CommentAuthorInformation;
36
contextValue?: string;
37
label?: string;
38
dispose(): void;
39
}
40
}
41
42