import { TeamList , MatchList , PlayerList } from './types' ; export type Action = { type : 'set-teams' ; teams : null | TeamList [ ] ; } | { type : 'set-matches' ; matches : null | MatchList [ ] ; } | { type : 'set-players' ; players : null | PlayerList [ ] ; } ; export const setTeams = ( teams ) : Action => ( { type : 'set-teams' , teams } ) ; export const setMatches = ( matches ) : Action => ( { type : 'set-matches' , matches } ) ; export const setPlayers = ( players ) : Action => ( { type : 'set-players' , players } ) ;