Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda