From fb93cc4cfb39948f63e2949387d0ed8012be7385 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 30 Oct 2024 14:24:17 +1100 Subject: [PATCH] Update mocks to resolve compilation errors (#16180) * Update mocks to resolve compilation errors * Fixes --- src/test/mocks/vsc/extHostedTypes.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/test/mocks/vsc/extHostedTypes.ts b/src/test/mocks/vsc/extHostedTypes.ts index 89493bf9dcd..0c088e50c39 100644 --- a/src/test/mocks/vsc/extHostedTypes.ts +++ b/src/test/mocks/vsc/extHostedTypes.ts @@ -2067,7 +2067,7 @@ export namespace vscMockExtHostedTypes { export class TreeItem { label?: string; resourceUri?: vscUri.URI; - iconPath?: string | vscUri.URI | { light: string | vscUri.URI; dark: string | vscUri.URI }; + iconPath?: IconPath; command?: vscode.Command; contextValue?: string; tooltip?: string; @@ -2104,6 +2104,24 @@ export namespace vscMockExtHostedTypes { } } + /** + * Represents an icon in the UI. This is either an uri, separate uris for the light- and dark-themes, + * or a {@link ThemeIcon theme icon}. + */ + export type IconPath = + | vscode.Uri + | { + /** + * The icon path for the light theme. + */ + light: vscode.Uri; + /** + * The icon path for the dark theme. + */ + dark: vscode.Uri; + } + | ThemeIcon; + export class ThemeColor { id: string; constructor(id: string) {