Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageEvent incorrectly references the Node global MessageEvent type. #2020

Closed
5 of 16 tasks
varmil opened this issue Sep 10, 2024 · 3 comments · Fixed by #2021
Closed
5 of 16 tasks

MessageEvent incorrectly references the Node global MessageEvent type. #2020

varmil opened this issue Sep 10, 2024 · 3 comments · Fixed by #2021
Assignees
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:types applies to `@slack/types`

Comments

@varmil
Copy link
Contributor

varmil commented Sep 10, 2024

Description

Describe your issue here.

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/rtm-api
  • @slack/webhooks
  • @slack/oauth
  • @slack/socket-mode
  • @slack/types
  • I don't know

Reproducible in:

package version: 2.13.0

node version: v20.12.1 (or higher)

OS version(s): Win 11

Steps to reproduce:

  1. Install the 2.13.0 package.
  2. Import any Type that uses the MessageEvent type.
  3. Show Property 'attachments' does not exist on type 'MessageEvent<any>'.ts(2339) error.

Expected result:

No errors should occur.

Actual result:

MessageEvent should actually read export type MessageEvent = AllMessageEvents; but instead it references the Node global MessageEvent type.

Attachments:

image

I create PR later

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:types applies to `@slack/types` labels Sep 10, 2024
@seratch seratch added this to the [email protected] milestone Sep 10, 2024
@seratch
Copy link
Member

seratch commented Sep 10, 2024

Hi @varmil, thanks for reporting this regression bug. It seems this issue was introduced by this PR #1907. As you suggested in #2021, moving the line of code for defining the "MessageEvent" type should resolve it.
@filmaj, can you take a look at this and make a patch release tomorrow?

@filmaj
Copy link
Contributor

filmaj commented Sep 10, 2024

Thank you for this, will certainly merge and release something to address this today. Just thinking through how to test for this to make sure we don't regress...

@filmaj
Copy link
Contributor

filmaj commented Sep 10, 2024

This is now fixed in v2.13.1 of @slack/types: https://github.com/slackapi/node-slack-sdk/releases/tag/%40slack%2Ftypes%402.13.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:types applies to `@slack/types`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants