import { ITeamsStatus } from "../types" ; param { array } groupIds param { boolean } isCoreTeam param { ITeamsStatus } teamsStatus export function teamsToAddUsersTo ( groupIds , isCoreTeam , teamsStatus ? ) { if ( isCoreTeam && teamsStatus ) { ( [ "content" , "followers" ] as Array < keyof ITeamsStatus > ) . forEach ( ( teamProp ) => { if ( teamsStatus [ teamProp ] && teamsStatus [ teamProp ] . isOk ) { groupIds . push ( teamsStatus [ teamProp ] . id ) ; } } ) ; } return groupIds ; }