Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Importing module without type definition in react-typescript

I am trying to import a module named blink-detection in my project. The library does not have any type definition. So, I have created a file named types/blink-detection.d.ts in project root. I have also changed my tsconfig.json

  "include": [
    "src",
    "types"
  ]

My blink-detection.d.ts:

declare module 'blink-detection';

But, I am getting an error message: export 'default' (imported as 'blink') was not found in 'blink-detection' (module has no exports). But, the index.js of blink-detection has default export:

const blink = {
  loadModel: loadModel,
  setUpCamera: setUpCamera,
  stopPrediction: stopPrediction,
  getBlinkPrediction: renderPrediction,
};

export default blink;

My typescript version: 4.5.3, react version is 17.0.2 and webpack version is 5.0.66.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!