Skip to content

Commit

Permalink
[styles] Fix createStyles for TypeScript v3.5 (mui#15990)
Browse files Browse the repository at this point in the history
* [styles] Fix createStyles for TypeScript v3.5

* Change link
  • Loading branch information
merceyz authored and eps1lon committed Jun 3, 2019
1 parent b0c846a commit f4dc7bb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { StyleRules } from '@material-ui/styles/withStyles';
* @param styles a set of style mappings
* @returns the same styles that were passed in
*/
export default function createStyles<C extends string, P extends object>(
// For TypeScript v3.5 P has to extend {} instead of object
// See https://github.com/mui-org/material-ui/issues/15942
// and https://github.com/microsoft/TypeScript/issues/31735
export default function createStyles<C extends string, P extends {}>(
styles: StyleRules<P, C>,
): StyleRules<P, C>;

0 comments on commit f4dc7bb

Please sign in to comment.