我在boilerplate project中遇到了一些代码,这让我有些困惑。
代码如下:
从'react'导入*作为React; 从'react-router'导入{RouteComponentProps}; 从'../components/Home'导入Home;
export class HomePage extends React.Component<RouteComponentProps<any>, void> {
render() {
return (
<Home />
);
}
}
export default (HomePage as any as React.StatelessComponent<RouteComponentProps<any>>);
让我感到困惑的那一行是:
export default (HomePage as any as React.StatelessComponent<RouteComponentProps<any>>)
这有什么目的?