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

Typescript for maxFileSize wrong message #618

Open
darkopetreski opened this issue Feb 25, 2024 · 1 comment
Open

Typescript for maxFileSize wrong message #618

darkopetreski opened this issue Feb 25, 2024 · 1 comment

Comments

@darkopetreski
Copy link

darkopetreski commented Feb 25, 2024

When the component is used with typescript maxFileSize gives warning, since the field is defined as boolean. It should be number.

maxFileSize?: boolean;

@sadik-malik
Copy link

@darkopetreski, there are already some PRs submitted for this dating back to 2020, but the maintainers still have not merged them. For now, you can override the type definition.

Create one global.d.ts file in your src folder and add the following to it.

declare module Resumable {
  export interface ConfigurationHash extends Resumable.ConfigurationHash {
    maxFileSize?: number
  }
}

declare module 'resumablejs' {
  export = Resumable.Resumable
}

Is someone still maintaining this library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants