-
Notifications
You must be signed in to change notification settings - Fork 663
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
SlackEventAdapter does not have type 'on' #948
Comments
Here is my workaround atm:
|
This is due to a change in the types for Node 13 (see here). Installing |
would love a fix for this. I see there's a PR in another issue that fixes this. The issue is that event emitter and http have no default import. The PR looks like it just needs a reviewer to approve it. Thanks for the work on this repo. |
I'm on node 14 and seeing this. Is there a fix planned before Node 14 becomes current, October 20? Or perhaps this is unique to me? |
I'm also facing this problem and installed the |
Description
I'm attempting to switch to using
@slack/events-api
with TypeScript and seem to be running into an error that is statingProperty 'on' does not exist on type 'SlackEventAdapter'
when trying to set up the event handling.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.
Packages:
Select all that apply:
@slack/web-api
@slack/events-api
@slack/interactive-messages
@slack/rtm-api
@slack/webhooks
Reproducible in:
package version: 2.3.1
node version: 12.13.1
OS version(s): Mac OSX
Steps to reproduce:
import { createEventAdapter } from '@slack/events-api'
const adapter = createEventAdapter(signingSecret)
adapter.on('link_shared', (event) => console.log(event))
and see the typescript errorExpected result: There to be no typescript errors
Actual result: Typescript error listed above.
Attachments:
The text was updated successfully, but these errors were encountered: