Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetryDelays: "Type 'null' is not assignable to type 'number[] | undefined'". But null is acceptable. #652

Closed
dmitriiprusakov opened this issue Nov 24, 2023 · 2 comments · Fixed by #655
Labels

Comments

@dmitriiprusakov
Copy link
Contributor

Bug description:

Option retryDelays can be an array or null, but in type definitions null is not assignable.

Current type for retryDelays: retryDelays?: number[]

image

@uppy/tus version: latest 3.4.0
tus-js-client version: latest 3.1.1

To Reproduce
Use latest 3.1.1 version of tus-js-client.

Expected behavior
No typescript error, null is acceptable for retryDelays.
Expected type: retryDelays?: number[] | null

@dmitriiprusakov dmitriiprusakov changed the title RetryDelays: "Type 'null' is not assignable to type number[] | undefined". But null is acceptable. RetryDelays: "Type 'null' is not assignable to type 'number[] | undefined'". But null is acceptable. Nov 24, 2023
@Acconut
Copy link
Member

Acconut commented Nov 27, 2023

Thanks for reporting this issue. Can you open a PR to fix the type`/

@dmitriiprusakov
Copy link
Contributor Author

Thanks for reporting this issue. Can you open a PR to fix the type`/

@Acconut , done!
Could you please check?

@Acconut Acconut linked a pull request Dec 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants