Conversation
| } | ||
|
|
||
| export interface ICodicon extends CSSIcon { | ||
| readonly codiconFontCharacter: string; |
There was a problem hiding this comment.
@aeschli fyi I decided here to name fontCharacter actually codiconFontCharacter to be able to implement a good isCodicon method that can check on that. Previously we were able to do instanceof Codicon, but with this change we no longer can. If we kept fontCharacter, there is a chance we would wrongly match on an object that has both id and fontCharacter. Since I found a few more types with fontCharacter I decided to go this path, but please verify that is OK.
|
Hm, I wonder if we can even get rid of export const Codicon = {
// built-in icons, with image name
'add': makeCodicon('add', '\\ea60'),Because looking at microsoft/TypeScript#51387, there seems to be additional lookup cost when using |
|
Better done in #171254 |
This speeds up
codicons.jsmodule load time 100% for me:Before

After
