import * as _ from "lodash" ; export let removeActivityFromArray = ( activityId , fromArray ) : Array < any > => { const predicate = < any > { id : activityId } ; return _ . without ( fromArray , _ . find ( fromArray , predicate ) ) ; } ; export let editActivityFromArray = ( activityId , fromArray , newName , newType ) : Array < any > => { const predicate = < any > { id : activityId } ; const a = _ . find ( fromArray , predicate ) ; a . name = newName ; a . type = newType ; a . display_type = newType ; return fromArray ; } ;