Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

121
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda