From e6ad73d5e3d178f3b19100718c78b4e56a946090 Mon Sep 17 00:00:00 2001 From: Wayne Dela Cruz Date: Wed, 29 Mar 2017 10:06:29 +0800 Subject: [PATCH] Fix travis build errors in material-ui tests * Create type Stylesheet who's props are all of type CSSProperties * Declared function createStylesheet which takes in an object and converts it's key-values to CSSProperties --- types/material-ui/material-ui-tests.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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,