Skip to content

Commit b775976

Browse files
committed
ThemeIcon ThemeColor proposed API changes
Part of microsoft#103120
1 parent 6891688 commit b775976

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/vs/vscode.proposed.d.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,11 +2169,18 @@ declare module 'vscode' {
21692169

21702170
//#region https://github.com/microsoft/vscode/issues/103120 @alexr00
21712171
export class ThemeIcon2 extends ThemeIcon {
2172+
2173+
/**
2174+
* The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
2175+
*/
2176+
public readonly id: string;
2177+
21722178
/**
2173-
* Returns a new `ThemeIcon` that will use the specified `ThemeColor`
2174-
* @param color The `ThemeColor` to use for the icon.
2179+
* Creates a reference to a theme icon.
2180+
* @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
2181+
* @param color optional `ThemeColor` for the icon.
21752182
*/
2176-
with(color: ThemeColor): ThemeIcon2;
2183+
constructor(id: string, color?: ThemeColor);
21772184
}
21782185
//#endregion
21792186
}

src/vs/workbench/api/common/extHostTypes.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,10 +2177,6 @@ export class ThemeIcon {
21772177
this.id = id;
21782178
this.themeColor = color;
21792179
}
2180-
2181-
with(color: ThemeColor): ThemeIcon {
2182-
return new ThemeIcon(this.id, color);
2183-
}
21842180
}
21852181
ThemeIcon.File = new ThemeIcon('file');
21862182
ThemeIcon.Folder = new ThemeIcon('folder');

0 commit comments

Comments
 (0)