-
Notifications
You must be signed in to change notification settings - Fork 676
Closed
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projectsenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitypkg:web-apiapplies to `@slack/web-api`applies to `@slack/web-api`
Milestone
Description
Description
When using chat.postMessage(), I was able to put a non-existent property in ChatPostMessageArguments and the process was executed without a compile error!
(Specifically, I typo icon_url as icon_ur...)
I got a response from @seratch , and it seems that this is largely due to the scope of WebAPICallOptions.
In the future, I'd like to see compilations not go through here, too.
What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Packages:
Select all that apply:
-
@slack/web-api -
@slack/events-api -
@slack/interactive-messages -
@slack/rtm-api -
@slack/webhooks -
@slack/oauth -
@slack/socket-mode - I don't know
Reproducible in:
package version: 6.2.4
node version: v16.4.0
OS version(s): MacOS 11.5.2
Steps to reproduce:
- import
ChatPostMessageArgumentsfrom @slack/web-api - define a variable of type ChatPostMessageArguments
- define a property that does not exist in ChatPostMessageArguments. like a below code
const msgOption: ChatPostMessageArguments = {
channel: Config.Slack.CHANNEL_NAME,
text,
foo: "foo", // non-existent property !!
username: arg.user.name,
icon_url: arg.user.avatarURL,
unfurl_links: true,
blocks: JSXSlack(Header(databaseName!, page)),
};Expected result:
What you expected to happen
Actual result:
Compilation will pass.
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projectsenhancementM-T: A feature request for new functionalityM-T: A feature request for new functionalitypkg:web-apiapplies to `@slack/web-api`applies to `@slack/web-api`


