Type Checking Bug
@hello-ashleyintech is already working on this.
Since Jul 16, 2025.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 445
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
@slack/bolt version
4.4.0
Your App and Receiver Configuration
const app = new App({
token: process.env.SLACK_OAUTH_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
socketMode: process.env.SLACK_SOCKET_MODE == "true",
appToken: process.env.SLACK_SOCKET_MODE == "true" ? process.env.SLACK_APP_TOKEN : undefined,
port: parseInt(process.env.SLACK_PORT || "3000", 10),
customRoutes: [
{
path: "/ping",
method: "GET",
handler: (req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain");
res.end("Pong!");
}
}
]
});
Node.js runtime version
v22.17.0
Steps to reproduce:
tsconfig.json
{
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"module": "NodeNext",
"outDir": "dist",
"sourceMap": true,
"lib": [
"es2022"
]
},
"include": [
"src/**/*"
],
}
Steps to reproduce (this does not happens only on app.action)
- On app.action, check body.user.username
- On app.action, check body.actions[0].value
- On app.action, check body.trigger_id
Expected result:
It shouldn't have show type errors
Actual result:
It seems to be showing up multiple errors on the type checking although it shows up when I try to view it through console.log
Errors
Property 'trigger_id' does not exist on type 'SlackViewAction'.\n Property 'trigger_id' does not exist on type 'ViewClosedAction'
Property 'username' does not exist on type '{ id: string; name: string; team_id?: string | undefined; } | { id: string; username: string; team_id?: string | undefined; } | { id: string; name?: string | undefined; username: string; team_id?: string | undefined; } | { ...; }'.\n Property 'username' does not exist on type '{ id: string; name: string; team_id?: string | undefined; }'
Property 'trigger_id' does not exist on type 'SlackAction'.\n Property 'trigger_id' does not exist on type 'DialogSubmitAction'
Property 'actions' does not exist on type 'SlackAction'.\n Property 'actions' does not exist on type 'DialogSubmitAction'
Property 'view' does not exist on type 'SlackAction'.\n Property 'view' does not exist on type 'InteractiveMessage'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.