UNPKG

1.32 kBTypeScriptView Raw
1import { CancellationToken, Disposable, Event } from '../common';
2import URI from '../common/uri';
3export interface DecorationsProvider {
4 readonly onDidChange: Event<URI[]>;
5 provideDecorations(uri: URI, token: CancellationToken): Decoration | Promise<Decoration | undefined> | undefined;
6}
7export interface Decoration {
8 readonly weight?: number;
9 readonly colorId?: string;
10 readonly letter?: string;
11 readonly tooltip?: string;
12 readonly bubble?: boolean;
13}
14export interface ResourceDecorationChangeEvent {
15 affectsResource(uri: URI): boolean;
16}
17export declare const DecorationsService: unique symbol;
18export interface DecorationsService {
19 readonly onDidChangeDecorations: Event<Map<string, Decoration>>;
20 registerDecorationsProvider(provider: DecorationsProvider): Disposable;
21 getDecoration(uri: URI, includeChildren: boolean): Decoration[];
22}
23export declare class DecorationsServiceImpl implements DecorationsService {
24 private readonly data;
25 private readonly onDidChangeDecorationsEmitter;
26 readonly onDidChangeDecorations: Event<Map<string, Decoration>>;
27 dispose(): void;
28 registerDecorationsProvider(provider: DecorationsProvider): Disposable;
29 getDecoration(uri: URI, includeChildren: boolean): Decoration[];
30}
31//# sourceMappingURL=decorations-service.d.ts.map
\No newline at end of file