diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4a1a51b934c..a0fd1ff7a04 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -808,11 +808,22 @@ declare module 'vscode' { */ static readonly Folder: ThemeIcon; + /** + * The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html. + */ + readonly id: string; + + /** + * The optional ThemeColor of the icon. The color is currently only used in [TreeItem](#TreeItem). + */ + readonly themeColor?: ThemeColor; + /** * Creates a reference to a theme icon. * @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html. + * @param color optional `ThemeColor` for the icon. The color is currently only used in [TreeItem](#TreeItem). */ - constructor(id: string); + constructor(id: string, color?: ThemeColor); } /** diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 63712708d62..3b0258815ff 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -2159,28 +2159,6 @@ declare module 'vscode' { //#endregion - //#region https://github.com/microsoft/vscode/issues/103120 @alexr00 - export class ThemeIcon2 extends ThemeIcon { - - /** - * The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html. - */ - readonly id: string; - - /** - * The optional ThemeColor of the icon. The color is currently only used in [TreeItem](#TreeItem). - */ - readonly themeColor?: ThemeColor; - - /** - * Creates a reference to a theme icon. - * @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html. - * @param color optional `ThemeColor` for the icon. The color is currently only used in [TreeItem](#TreeItem). - */ - constructor(id: string, color?: ThemeColor); - } - //#endregion - //#region https://github.com/microsoft/vscode/issues/102665 Comment API @rebornix export interface CommentThread { /** diff --git a/src/vs/workbench/api/common/extHostTreeViews.ts b/src/vs/workbench/api/common/extHostTreeViews.ts index 5406cfa39d1..d7194fc2317 100644 --- a/src/vs/workbench/api/common/extHostTreeViews.ts +++ b/src/vs/workbench/api/common/extHostTreeViews.ts @@ -601,9 +601,6 @@ class ExtHostTreeView extends Disposable { } private getThemeIcon(extensionTreeItem: vscode.TreeItem2): ThemeIcon | undefined { - if ((extensionTreeItem.iconPath instanceof ThemeIcon) && extensionTreeItem.iconPath.themeColor) { - checkProposedApiEnabled(this.extension); - } return extensionTreeItem.iconPath instanceof ThemeIcon ? extensionTreeItem.iconPath : undefined; }