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

204
Visualizações
Assigning type to parameter from imported library in Typescript

I am struggling with declaring the right type to a function parameter i use and i don't seem to understand the logic behind it please help.

The following situation:

const { U64 } = require("somepackage");

export const someFunct = function (
    someParameter: any ( this is of type U64 ) 
){...}

If i replace any with U64 i get:

'U64' refers to a value, but is being used as a type here. Did you mean 'typeof U64'?

If i use someParameter: typeof U64 the parameter still says any if i hove over it.

What am i missing? How is this supposed to be done?

Typescript Playground

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