Incorrect typing for global shortcut parameters #1512
Labels
bug
M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
TypeScript-specific
Description
The typing for global shortcut handlers is incorrect. The destructured parameter list contains the
say
andrespond
methods, but they are undefined during runtime. Those functions being undefined is the correct behavior and aligns with the documentation, but the typing doesn't reflect it.A minimal code to reproduce:
PS: The typing is generally very well made and easy to understand a really good job! This can be easily used as an example of how to write great generic typing with auto inferring. Kudos for the engineers who made it!
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version: @slack/bolt@3.11.3
node version: v16.13.1 (LTS)
OS version(s): Windows 10 21H1 (OS Build 19043.1766)
Steps to reproduce:
say
method is undefinedExpected result:
Typing is correct for global shortcuts and the compilation of the above code fails at build time.
Actual result:
No errors and build time, app raises a TypeError during runtime.
Attachments:
none
The text was updated successfully, but these errors were encountered: