import { Progress } from "../types" ; interface ProgressDataOptions { current : number ; total : number ; chapterId : string | number ; at ? : number ; } export default function getProgressData ( { current , total , chapterId , at = Date . now ( ) , } ) { return { current , total , percentage : Math . round ( ( current / total ) * 100 ) , at , chapterId } ; }