Created
March 6, 2019 22:26
-
-
Save SuperOleg39/9502300d35e4dbfcdf852a6419e0e844 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // entities/video/index.ts | |
| type IVideo = { | |
| src: string; | |
| } | |
| const getVideoSrc = (video: IVideo): number => { | |
| return video.src; | |
| } | |
| const setVideoSrc = (video: IVideo, src: string): number => { | |
| return { ... video, src }; | |
| } | |
| // redux/entities/index.ts | |
| type IEntitiesState = { | |
| videos: IVideosState; | |
| } | |
| // redux/entities/video/index.ts | |
| type IVideosState = { | |
| [key: number]: IVideo; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment