This commit is contained in:
Andros Fenollosa
2022-02-11 11:57:55 +01:00
parent 6b368110b1
commit 608f35a9f7
4 changed files with 294 additions and 4 deletions

View File

@ -180,7 +180,7 @@ export function getIndexOfFileList(name: string, list: Array<File>): number {
* deleteArrayElementByIndex(2, ['a', 'b', 'c', 'd'])
* // => ['a', 'b', 'd']
*/
export function deleteArrayElementByIndex(index: number, list: Array<any>): FileList {
export function deleteArrayElementByIndex(index: number, list: Array<any>): Array<any> {
return list.filter((item, itemIndex) => itemIndex !== index);
}