Open ChuckJonas opened 5 months ago
This is a hard problem for Slack. While argument types are possible (though they take a lot of work to maintain; see e.g. the node PR that put them into place for the @slack/web-api
package), response types are difficult due to the context of execution impacting responses. For example, certain APIs payload will differ depending on the Slack paid plan you are on. Other fields are also client-context-specific: some events will have different payload shapes depending on what object within Slack is being operated on.
Ideally, we would re-use the node @slack/web-api
library instead of depending on this library, but last I tried to use the node-to-deno compatibility layer with the @slack/web-api
npm library, support was not good.
Description of the problem being solved
Please add types to the client. Seems like all but a very few of the
SlackAPIClient
methods are untyped. This makes the DX very poor.Alternative solutions
Generate your own types based on the docs, but this can be inaccurate
Requirements
Have accurate types for all endpoints of the APIClient