You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand this is a bug report and questions should be posted in the Community Forum
I searched issues and couldn’t find anything (or linked relevant results below)
Link to runnable example
No response
Steps to reproduce
The existing FileProgress type looks like:
// FileProgress is either started or not started. We want to make sure TS doesn't// let us mix the two cases, and for that effect, we have one type for each case:exporttypeFileProgressStarted=FileProgressBase&{uploadStarted: numberbytesUploaded: number}exporttypeFileProgressNotStarted=FileProgressBase&{uploadStarted: nullbytesUploaded: false}exporttypeFileProgress=FileProgressStarted|FileProgressNotStarted
However, the Uppy documentation still states (and still appears to support) setting files as already uploaded:
Expected behavior
The FileProgress type may need to look more like:
// FileProgress is either started, not started, or pre-uploaded. We want to make sure TS doesn't// let us mix the two cases, and for that effect, we have one type for each case:exporttypeFileProgressStarted=FileProgressBase&{uploadStarted: numberbytesUploaded: number}exporttypeFileProgressNotStarted=FileProgressBase&{uploadStarted: nullbytesUploaded: false}// Q: should the FileProgressBase be added here? I don't think any of those base values get set in this situationexporttypeFileProgressPreUploaded={uploadComplete: trueuploadStarted: true}exporttypeFileProgress=FileProgressStarted|FileProgressNotStarted|FileProgressPreUploaded
which would allow me to avoid writing a TypeScript exception and make it clear that this is supported behavior.
Actual behavior
Need to add a @ts-ignore or @ts-expect-error to allow (what appears to be) supported behavior
Initial checklist
Link to runnable example
No response
Steps to reproduce
The existing
FileProgress
type looks like:However, the Uppy documentation still states (and still appears to support) setting files as already uploaded:
Expected behavior
The
FileProgress
type may need to look more like:which would allow me to avoid writing a TypeScript exception and make it clear that this is supported behavior.
Actual behavior
Need to add a
@ts-ignore
or@ts-expect-error
to allow (what appears to be) supported behaviorThe text was updated successfully, but these errors were encountered: