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

[FEATURE] Add proper types to clients #97

Open
ChuckJonas opened this issue Apr 3, 2024 · 1 comment
Open

[FEATURE] Add proper types to clients #97

ChuckJonas opened this issue Apr 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ChuckJonas
Copy link

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

@filmaj filmaj added the enhancement New feature or request label Apr 3, 2024
@filmaj
Copy link
Contributor

filmaj commented Apr 3, 2024

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.

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

No branches or pull requests

2 participants