-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add types for cds.utils.colors
#263
Conversation
Thanks for this contribution! Seeing that the colour strings seem to be used as both primary and background-colour, would pulling them out into a separate type be desirable? Alternatively just as a dictionary. |
Since which sap/cds version is this available? Should document this. |
|
Was merged just a week ago, so >= 8.3.0.
Yep :) cap-js/docs#1285
Two reasons why I kept it separate:
|
I see, then maybe type Colors = {
BLUE: string,
GREEN: string,
...
}
type colors: Colors & {
ITALIC: string,
...
GRAY: string, // exclusive to foreground colors
bg: Colors & {
DEFAULT: string
}
} ? |
I just found out I could type the values more explicitly using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks indeed better. Still not super stoked about this looming typo-catastrophe, but I'm probably blowing this out of proportion. 🙂
Requires cap-js/docs#1285 for the
@see
link to work.See cap/cds/pull/4656