Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
How do I find the appropriate TypeScript type for a given function signature in a third party package?

I want to learn TypeScript but may be punching too far above my weight. I'm attempting to use Slacks BoltJS library and all is good in regular JS but I'm stuck at step one WRT TypeScript. As a general question how would I take a normal JS method signature and convert it to its appropriate type(s) from a third party library?

Here's the method signature I'm currently looking at converting:

app.event('app_home_opened', async (event, client, context) => { });

I looked through node_modules/@slack/bolt/dist/types essentially for a type that centered around events and that contained at least event, client, and context as instance variables. I tried BasicSlackEvent, BasicSlackEvent<'AppHomeOpenedEvent'>, SlackEventMiddlewareArgs<'AppHomeOpenedEvent'> and a few others.

I want to solve this for the above case but the question is more general. Is there an easier way to convert a plain JS signature to its TypeScript equivalent?

I'm using VSCode and there is definitely some linting going on but I don't think I'm providing enough context for VSCode to help me.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!