From e94ac89c146942dee9e269153b1de0dd4aa3810c Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 16 Apr 2019 21:16:54 +0200 Subject: [PATCH] Cast to a specific type instead of any --- docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.js | 4 ++-- docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.js b/docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.js index ba00d9e9f96ec5..23d5b40d899e24 100644 --- a/docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.js +++ b/docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.js @@ -22,7 +22,7 @@ const StyledBreadcrumb = withStyles(theme => ({ backgroundColor: emphasize(theme.palette.grey[300], 0.12), }, }, -}))(props => ); +}))(Chip); // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591 function handleClick(event) { event.preventDefault(); @@ -45,7 +45,7 @@ function CustomizedBreadcrumbs() { return ( - ({ backgroundColor: emphasize(theme.palette.grey[300], 0.12), }, }, -}))((props: any) => ); +}))(Chip) as typeof Chip; // TypeScript only: need a type cast here because https://github.com/Microsoft/TypeScript/issues/26591 -function handleClick(event: React.MouseEvent) { +function handleClick(event: React.MouseEvent) { event.preventDefault(); alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert } @@ -47,7 +47,7 @@ function CustomizedBreadcrumbs() { return ( -