Users of this SDK who also use Typescript to author their application will greatly benefit from type definitions. It helps in refactoring, and in static analysis to find bugs. There is tooling in the community to expose the type definitions in the same npm package as the SDK itself, and we will be utilizing that.
At this time, we are not authoring the source of this SDK in TypeScript, so we just need external definition files. We've been talking to a few developers who have hand-rolled this information on their own and would be interested in contributing and helping maintain them for an on-going basis. Big thanks for @bmajz who is working on this task currently.
Is there a branch where we can follow the development or contribute?
Not yet, but will be publishing an initial PR soon
I wonder if two weeks qualify as "soon"? :D
Jokes apart, can we get some update on this? :)
@nistvan86 thanks for the reminder. Will get the PR up today.
+1 (+many!!). Yes please to TypeScript support for this!!!!
to close the loop, there's two different efforts going on:
in #329 we have typings that are authored outside the source code. individuals can pull these into their own project manually for now, but we will most likely get them published to npm as @types/slack__client. for an immediate need, that is the issue to follow.
in #352 we have the beginning of the work to author in typescript. this is the long term solution and will likely land in the next major version (v4) of this library. this will be better for typescript users because the types can never mismatch if the library is authored in typescript. stay tuned to this issue and plan to migrate appropriately when it lands.
that should cover all concerns for now, so i'm closing this issue.
Is any of these type definitions published on npm? Thanks!
@omidkrad not on npm, but we posted an API spec file over here: https://github.com/slackapi/slack-api-specs/blob/master/web-api/slack_web_openapi_v2.json
@Roach thanks, but that only documents the REST API. I suppose the reason @slack/client npm module exists is to abstract away the REST API and give developers a JavaScript API instead. TypeScript definitions would document the JS API.
Most helpful comment
@nistvan86 thanks for the reminder. Will get the PR up today.