mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Update comment sample
This commit is contained in:
38
comment-sample/src/typings/vscode.d.ts
vendored
Normal file
38
comment-sample/src/typings/vscode.d.ts
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
declare module 'vscode' {
|
||||
|
||||
/**
|
||||
* Reactions of a [comment](#Comment)
|
||||
*/
|
||||
export interface CommentReaction {
|
||||
/**
|
||||
* The human-readable label for the reaction
|
||||
*/
|
||||
readonly label: string;
|
||||
|
||||
/**
|
||||
* Icon for the reaction shown in UI.
|
||||
*/
|
||||
readonly iconPath: string | Uri;
|
||||
|
||||
/**
|
||||
* The number of users who have reacted to this reaction
|
||||
*/
|
||||
readonly count: number;
|
||||
|
||||
/**
|
||||
* Whether the [author](CommentAuthorInformation) of the comment has reacted to this reaction
|
||||
*/
|
||||
readonly authorHasReacted: boolean;
|
||||
}
|
||||
|
||||
export interface Comment {
|
||||
reactions?: CommentReaction[];
|
||||
}
|
||||
|
||||
export interface CommentController {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
reactionHandler?: (comment: Comment, reaction: CommentReaction) => Promise<void>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user