From eec966ef784433e4bd90547ee1c2739c86a2542a Mon Sep 17 00:00:00 2001 From: Onilton Maciel Date: Thu, 17 Sep 2020 19:07:47 -0300 Subject: [PATCH] Fix type of generateUniqueIdentifier attribute --- resumable.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resumable.d.ts b/resumable.d.ts index 8ada5eeb..f245224c 100644 --- a/resumable.d.ts +++ b/resumable.d.ts @@ -100,7 +100,7 @@ declare namespace Resumable { /** * Override the function that generates unique identifiers for each file. (Default: null) **/ - generateUniqueIdentifier?: () => string; + generateUniqueIdentifier?: (() => string) | ((file: BackwardCompatibleDOMFile) => string) | ((file: BackwardCompatibleDOMFile, event: Event) => string); /** * Indicates how many files can be uploaded in a single session. Valid values are any positive integer and undefined for no limit. (Default: undefined) **/ @@ -367,6 +367,13 @@ declare namespace Resumable { } interface ResumableChunk { } + + /* To deal with some confusion in different versions of Firefox*/ + interface BackwardCompatibleDOMFile extends File { + readonly webkitRelativePath: string; + readonly relativePath: string; + readonly fileName: string; + } } declare module 'resumablejs' {