Not seeing types in @cornerstonejs/dicom-image-loader

Describe Your Question

When I try to import @cornerstonejs/dicom-image-loader into my typescript project, I get a “‘cornerstoneDICOMImageLoader’ is declared but its value is never read.” error message, which means Typescript can’t find the type definitions.

I went and looked directly inside the @cornerstonejs/dicom-image-loader package in node_modules and am not seeing any .d.ts files or module declarations anywhere. The README for the package says it has “Typescript support (and type definitions)”, so I think I’m missing something. Any ideas what I might be doing wrong? I’m on version 1.19.4.

Hello @ethanjdiamond and welcome to the OHIF community forum.

I wonder if perhaps the following dependency is missing from the package.json file?

"@cornerstonejs/dicom-image-loader": "^1.20.3",