Skip to content

Commit 2e2d14c

Browse files
committed
some jsdoc for #54938
1 parent 40827f3 commit 2e2d14c

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

src/vs/vscode.proposed.d.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,16 +717,69 @@ declare module 'vscode' {
717717

718718
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938
719719

720+
// TODO@jrieken FileDecoration, FileDecorationProvider etc.
721+
// TODO@jrieken Add selector notion to limit decorations to a view.
722+
// TODO@jrieken Rename `Decoration.letter` to `short` so that it could be used for coverage et al.
723+
720724
export class Decoration {
725+
726+
/**
727+
* A letter that represents this decoration.
728+
*/
721729
letter?: string;
730+
731+
/**
732+
* The human-readable title for this decoration.
733+
*/
722734
title?: string;
735+
736+
/**
737+
* The color of this decoration.
738+
*/
723739
color?: ThemeColor;
740+
741+
/**
742+
* The priority of this decoration.
743+
*/
724744
priority?: number;
745+
746+
/**
747+
* A flag expressing that this decoration should be
748+
* propagted to its parents.
749+
*/
725750
bubble?: boolean;
751+
752+
/**
753+
* Creates a new decoration.
754+
*
755+
* @param letter A letter that represents the decoration.
756+
* @param title The title of the decoration.
757+
* @param color The color of the decoration.
758+
*/
759+
constructor(letter?: string, title?: string, color?: ThemeColor);
726760
}
727761

762+
/**
763+
* The decoration provider interfaces defines the contract between extensions and
764+
* file decorations.
765+
*/
728766
export interface DecorationProvider {
767+
768+
/**
769+
* An event to signal decorations for one or many files have changed.
770+
*
771+
* @see [EventEmitter](#EventEmitter
772+
*/
729773
onDidChangeDecorations: Event<undefined | Uri | Uri[]>;
774+
775+
/**
776+
* Provide decorations for a given uri.
777+
*
778+
*
779+
* @param uri The uri of the file to provide a decoration for.
780+
* @param token A cancellation token.
781+
* @returns A decoration or a thenable that resolves to such.
782+
*/
730783
provideDecoration(uri: Uri, token: CancellationToken): ProviderResult<Decoration>;
731784
}
732785

0 commit comments

Comments
 (0)