import { SlotId } from '../types' ; export const changeArrayItemOnIndex = ( arr , index , item ) => { return [ ... arr . slice ( 0 , index ) , item , ... arr . slice ( index + 1 ) ] ; } ; export const removeSlotFromSlotIdArray = < T extends SlotId > ( arr , slotId ) : T [ ] => { return arr . filter ( _ => ! ( _ . abilityName === slotId . abilityName && _ . slotName === slotId . slotName ) ) ; } ;