slackapi / node-slack-sdk

Slack Developer Kit for Node.js
https://slack.dev/node-slack-sdk
MIT License
3.26k stars 656 forks source link

types: export additional union types used internally #1818

Closed filmaj closed 3 weeks ago

filmaj commented 3 weeks ago

This issue comes out of #1227 and has one example of the suggestion to export certain union types as their own standalone type in the draft PR #1228 (in this commit specifically).

Seems like a no brainer! We should export - and reuse - different kinds of union types we use internally. This is more of a refactoring task and so could be a good first issue to pick up. This commit shows off the proposed solution well. It is particularly applicable to the elements array on Blocks, which can contain a certain subset of different Block Elements.

Technically the refactor could be a patch version bump and exporting the new types would be a minor version bump. As such, this could go out in a patch or minor new release in the 2.x line of types.