Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

[Feature Request] More accurate types for typescript

Open Shenkeeee opened this issue 3 months ago • 2 comments

What feature or change would you like to see made?

More types for TypeScript. There are 68 any types currently in the codebase. E.g the _getSeries method in the DicomMetadataStore could utilize the study type for the series in the model.

Why should we prioritize this feature?

For easier and a more maintainable usage. Easier to write since it recommends you what properties the object has, and more maintainable since the errors gotten out of types will eliminate errors based on non-existent properties or inconsistent casing, etc.

Shenkeeee avatar Oct 10 '25 08:10 Shenkeeee

I agree, but it is really hard to fix all so we appreciate your help

sedghi avatar Oct 10 '25 12:10 sedghi

@sedghi This is a great proposal and I'm more than willing to help, but there are a few issues that need to be clarified in advance. For example, which specific file require revisions, how should we handle the problem of repeated modifications when multiple people are collaborating, and whether we should create issues for the various files that need changes. I've noticed that some files (e.g., CommandManager) have both JsDoc and TypeScript types. Should we support both, or only need to ensure that one of them is supported?

ulgyd0gg avatar Oct 29 '25 03:10 ulgyd0gg