提交 b775976b 编写于 作者: A Alex Ross

ThemeIcon ThemeColor proposed API changes

Part of #103120
上级 6891688d
......@@ -2169,11 +2169,18 @@ declare module 'vscode' {
//#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.
*/
public readonly id: string;
/**
* Returns a new `ThemeIcon` that will use the specified `ThemeColor`
* @param color The `ThemeColor` to use for the icon.
* 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.
*/
with(color: ThemeColor): ThemeIcon2;
constructor(id: string, color?: ThemeColor);
}
//#endregion
}
......@@ -2177,10 +2177,6 @@ export class ThemeIcon {
this.id = id;
this.themeColor = color;
}
with(color: ThemeColor): ThemeIcon {
return new ThemeIcon(this.id, color);
}
}
ThemeIcon.File = new ThemeIcon('file');
ThemeIcon.Folder = new ThemeIcon('folder');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册