Closed kujiy closed 3 months ago
Hi @kujiy, thank you for taking the time to provide this feedback!
Indeed, the method does work even without passing an argument, but it is a rare case among the Slack web APIs. For this reason, we generally recommend passing an empty argument object to any methods, which is why the TS typing requires an arugment object.
That being said, we are open to making minor modifications to exceptions such as the api.test and auth.test API methods. I will leave this issue open for potential future enhancements.
This change was introduced in web-api v7, and is explicitly detailed in the migration guide for this method, FYI.
That said I agree with @seratch - perhaps we can look into additional code to create an exception for zero-argument methods.
Packages:
Select all that apply:
@slack/web-api
Reproducible in:
The Slack SDK version
Node.js runtime version
OS info
Steps to reproduce:
Create a WebClient instance and call
.auth.test()
without argument.Expected result:
.auth.test()
returns a userinfo of the bot.Actual result:
It requires an empty dict as an argument.
Requirements
I read the requirements and agreed with the rules.