Guest User

Untitled

a guest
Jan 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. class FileItem extends Component<IFileItemProps, undefined> {
  2. }
  3.  
  4. const mapStateToProps = (state: IFileItemReduxState): IFileItemReduxProps => {
  5. };
  6.  
  7. const mapDispatchToProps = (dispatch: Dispatch): IFileItemDispatchProps => {
  8. };
  9.  
  10. // This FileItem component passed into the below parameter is where I am getting the error
  11.  
  12. export default connect<IFileItemReduxProps, IFileItemDispatchProps, IFilePassedProps, IFileItemReduxState>(mapStateToProps, mapDispatchToProps)(FileItem);
  13.  
  14. export interface IFileItemProps {
  15. file: FileDirectoryNode;
  16. fileExplorerInfo: FileExplorerReducerState;
  17. selectFile: (file: FileDirectoryNode) => void;
  18. openFile: (file: FileDirectoryNode) => void;
  19. }
  20.  
  21. export interface IFilePassedProps {
  22. file: FileDirectoryNode;
  23. }
  24.  
  25. export interface IFileItemReduxState {
  26. fileExplorer: FileDirectoryTree;
  27. }
  28.  
  29. export interface IFileItemReduxProps {
  30. fileExplorerInfo: FileDirectoryTree;
  31. }
  32.  
  33. export interface IFileItemDispatchProps {
  34. selectFile: (file: FileDirectoryNode) => void;
  35. openFile: (file: FileDirectoryNode) => void;
  36. }
  37.  
  38. connect<TReturnedMapStateToProps = {}, TReturnedMapDispatchToProps = {}, TPassedFromOutsideProps= {}, TReduxState = {}>
Add Comment
Please, Sign In to add comment