-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
type/debtTechnical debt that could slow us down in the long runTechnical debt that could slow us down in the long run
Milestone
Description
Current state:
xterm.js/src/common/Types.d.ts
Lines 71 to 100 in 17cb610
| /** Attribute data */ | |
| export interface IAttributeData { | |
| fg: number; | |
| bg: number; | |
| clone(): IAttributeData; | |
| // flags | |
| isInverse(): number; | |
| isBold(): number; | |
| isUnderline(): number; | |
| isBlink(): number; | |
| isInvisible(): number; | |
| isItalic(): number; | |
| isDim(): number; | |
| // color modes | |
| getFgColorMode(): number; | |
| getBgColorMode(): number; | |
| isFgRGB(): boolean; | |
| isBgRGB(): boolean; | |
| isFgPalette(): boolean; | |
| isBgPalette(): boolean; | |
| isFgDefault(): boolean; | |
| isBgDefault(): boolean; | |
| // colors | |
| getFgColor(): number; | |
| getBgColor(): number; | |
| } |
Problems:
fgandbgare very ambiguousgetFgColorandgetBgColorreturn a number, not anIColor- Can we improve
getFgColorModeandgetBgColorModeto return atype ColorMode = CM_DEFAULT | CM_P16 | CM_P256 | CM_RGBinstead ofnumber? - This whole interface could do with some detailed docs, especially since it's probably going to get exposed in xterm.d.ts in Add foreground/background color support for SerializeAddon #2369
Metadata
Metadata
Assignees
Labels
type/debtTechnical debt that could slow us down in the long runTechnical debt that could slow us down in the long run