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

270
Vistas
Cannot access jQuery in TypeScript

I am experimenting with TypeScript. I wanted to clean up my files by importing and exporting functions. But I need jQuery, so I imported it using import * as $ from './jquery';. But I get this error:

Uncaught TypeError: $ is not a function

What have I done wrong?

Thank you!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Downloading the js file is not something that in modern JS happens anymore. One would expect to set up the project with npm and use a bundler.

In any way, you have two alternatives:

  • declare const $, on the top of the file. This won't activate the IntelliSense suggestions but will prevent TypeScript to complain about the missing symbol

  • npm i --save-dev @types/jquery, if you are already using npm, will download the type definitions for jQuery and activate the IntelliSense suggestions

about 4 years ago · Juan Pablo Isaza Denunciar
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