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",

Hello, @ethanjdiamond

I am facing the same issue as you. I can’t find any TypeScript declared files in the library, which is preventing TypeScript from being applied. Did you manage to resolve this problem? If so, could you share how you solved it?

Thank you!

It is getting fixed in cornerstone3D 2.0 soon

stay tuned