@@ -39,7 +39,7 @@ export interface FileUploadState<CustomError = never> {
3939 * Each key in this object is the {@link BaseFileUploadStats.key} generated
4040 * once the upload starts pending.
4141 */
42- stats : Record < string , FileUploadStats > ;
42+ stats : Readonly < Record < string , Readonly < FileUploadStats > > > ;
4343
4444 /**
4545 * A list of validation errors that have occurred before starting the upload
@@ -66,7 +66,7 @@ export interface FileUploadHookState<CustomError = never>
6666 *
6767 * Note: Once an upload has completed, the reader will be removed.
6868 */
69- readers : Record < string , FileReader > ;
69+ readers : Readonly < Record < string , FileReader > > ;
7070}
7171
7272/**
@@ -155,7 +155,7 @@ export interface FileUploadHookReturnValue<
155155 *
156156 * @see {@link getSplitFileUploads } for separating by status
157157 */
158- stats : readonly FileUploadStats [ ] ;
158+ stats : readonly Readonly < FileUploadStats > [ ] ;
159159
160160 /**
161161 * The total number of bytes for all the files that exist in the
@@ -218,9 +218,8 @@ export function useFileUpload<E extends HTMLElement, CustomError = never>({
218218 onChange : propOnChange ,
219219 validateFiles = defaultValidateFiles ,
220220 getFileParser = defaultGetFileParser ,
221- } : FileUploadOptions < E , CustomError > = { } ) : FileUploadHookReturnValue <
222- E ,
223- CustomError
221+ } : FileUploadOptions < E , CustomError > = { } ) : Readonly <
222+ FileUploadHookReturnValue < E , CustomError >
224223> {
225224 const [ state , dispatch ] = useReducer (
226225 function reducer (
0 commit comments