diff --git a/types/material-ui/material-ui-tests.tsx b/types/material-ui/material-ui-tests.tsx index bb2bba94c8..2388630d8f 100644 --- a/types/material-ui/material-ui-tests.tsx +++ b/types/material-ui/material-ui-tests.tsx @@ -109,7 +109,13 @@ function handleTouchTap() { alert('onTouchTap triggered on the title component'); } -const styles = { +type Stylesheet = { + [P in keyof T]: React.CSSProperties +}; + +declare function createStylesheet(args: T): Stylesheet; + +const styles = createStylesheet({ title: { cursor: 'pointer', }, @@ -232,7 +238,7 @@ const styles = { floatingLabelFocusStyle: { color: blue500, }, -}; +}); const style = { marginRight: 20,