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.