import { DetectionResult } from '~/core/types' ; const keys = [ 'start' , 'end' , 'fullStart' , 'fullEnd' ] as const ; export function shiftDetectionPosition ( result , offest ) { return result . map ( ( i ) => { const data = { ... i } ; for ( const key of keys ) { if ( data [ key ] != null ) data [ key ] += offest ; } return data ; } ) ; }