-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[theme] Correct augmentColor TypeScript definition #13376
Conversation
sveyret
commented
Oct 24, 2018
- I have followed (at least) the PR section of the contributing guide.
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.
Bonus points if you add some tests for the declarations.
You can simply create a file named ´createPalette.spec.tsnext to the declarations and write some usage statements in there (e.g. examples from the unit tests) and annotate those statements with
// $ExpectError` where you think ts should report at compile time.
e.g. packages/material-ui/TextField/TextField.spec.tsx
is such a test for type declarations.
💯 for adding new TypeScript and unit tests. |
Actually, shade parameters are useless with a |
I have another suggestion. As you defined the type
This would prevent from giving an empty object Edit: Actually, this may not be a good idea, because if the color needs to have at least one entry, the one defined in main shade, it does not need to be |