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

[Bug] Property 'setRequestOptions' does not exist on type 'Client' #1163

Closed
b0939261761 opened this issue May 30, 2023 · 7 comments
Closed

Comments

@b0939261761
Copy link

Hi,
node.js - 20.1.
minio - 7.1.1
typescript - 4.9.5

When I updated minio from version 7.0.32 to version 7.1.1, I got an error.

 error TS2339: Property 'setRequestOptions' does not exist on type 'Client'.
this.client.setRequestOptions({ rejectUnauthorized: false });

In the file minio.d.c there is no signature of the function setRequestOptions(options: RequestOptions): void;.

The @types/minio package has this signature of the function setRequestOptions
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/73fd4e988115d6a2d5fbf14343c8a28985eab4ad/types/minio/index.d.ts#L651

Thanks.

@trim21
Copy link
Contributor

trim21 commented May 30, 2023

already fixed in master branch

@b0939261761
Copy link
Author

Hi, In the master branch, I did not find the signature of the setRequestOptions function.

https://github.com/minio/minio-js/blob/master/src/minio.d.ts

@trim21
Copy link
Contributor

trim21 commented May 31, 2023

Hi, In the master branch, I did not find the signature of the setRequestOptions function.

https://github.com/minio/minio-js/blob/master/src/minio.d.ts

Yes, now it's written in typescript so we don't need it in d.ts anymore

public setRequestOptions(options: Pick<https.RequestOptions, (typeof requestOptionProperties)[number]>) {

@trim21
Copy link
Contributor

trim21 commented May 31, 2023

you may still need types/minio before next version is released…

@prakashsvmx
Copy link
Member

The 7.1.1 is to ensure the workflow is tested end to end. so you could wait for the upcoming releases. @b0939261761

@b0939261761
Copy link
Author

I updated minio to version 7.1.1. The error remains "Property 'setRequestOptions' does not exist on type 'Client'."

@trim21
Copy link
Contributor

trim21 commented Jun 6, 2023

yes, fixes is not released.

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

3 participants