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
You are correct, thank you for reporting! Would you be able to submit a PR to fix the current type definitions? Getting the automatically generated is a nice improvement but will probably take some time to achieve.
nh2
added a commit
to nh2/tus-js-client
that referenced
this issue
Apr 14, 2023
The types say all fields in
DetailedError
are guaranteed to be peresent:tus-js-client/lib/index.d.ts
Lines 123 to 127 in 4ff243c
But they are
null
sometimes. This caused a runtime crash in my app.I think this would be a great idea, as humans just aren't good at tracking what can be null and what cannot:
Cause
tus-js-client/lib/error.js
Lines 1 to 2 in 4ff243c
causingError
can benull
:tus-js-client/lib/upload.js
Line 124 in 4ff243c
originalResponse
can benull
:tus-js-client/lib/upload.js
Lines 126 to 128 in 4ff243c
The text was updated successfully, but these errors were encountered: