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

167
Visualizações
show Definition or Type definition for built in js methods with ts

I don't know if I had this issue with my other projects I am using Typescript and react from CRA for an electron application. It doesn't cause me any issues. But I would love to get a definition on methods like .splice() or .toLowerCase() when I hover over them so I don't have to take a quick look on w3 or mdn for what parameters to pass. I don't have a problem getting the definition or type definition of functions I have written. Or from Packages I use. I have intellisense and js and ts language support extensions installed.

  • After looking into it further This problem for me has to do with Typescript seeing a value or prop as any. so the method any.splice() has no definition while [].splice() does.

  • I have types declared for this object called data and one of its props is email_addresses which has a type for it. but ts assumes it is any? -- it is and object in an object

type ConfigPageType = {
 email_addresses: EmailAddressesType[]
}

why is it any? I get data from an axios response and it properly says data is ConfigPageType but email_addresses is any? Please answer why email_addresses is any And if there is a way to get the definition of val.splice() or val.toLowerCase() when val is any?

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