dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

JSDoc and typescript declaration file (*.d.ts)

Open WoonchanCho opened this issue 4 years ago • 10 comments

Hi @pieper and other maintainers, Thank you so much for initiating and maintaining this great project. I am trying to test this library out as much as I can in our team's projects and enjoy using it now.

This is not a production issue at all but a kind of improvement suggestion. As you know, the source code itself is not fully documented. It would be great to have JsDoc comments at the JavaScript source level.

This will help a lot to users who use a modern editor that provides an IntelliSense with the JsDocs comments. Even more than that, it will also make creating & maintaining the typescript declaration files (*.d.ts) extremely easy.

I will be happy to add the JsDoc comment to all the active JavaScript sources in the project. For sure, this will be (should be) no harm to the functionalities of the library because this work will only add comments package.json for the two DevDependencies: JsDoc and TypeScript (Typescript will be used only for creating declaration files)

My only concern is that I'm not a native English speaker, there might be some awkward expression used. If I add those JsDoc comments, can you review them and update if there is anything weird?

Thank you so much.

WoonchanCho avatar Jan 28 '21 04:01 WoonchanCho

@pieper I have Typescript type declarations for parts of the library, which I would be happy to share/add and which we could build on.

hackermd avatar Jan 28 '21 12:01 hackermd

Hi @WoonchanCho and @hackermd - these sound like great improvements to me. The core code is pretty stable at this point so now would be a good time to put in some more documentation and ts help. I'd be happy to review and edit 👍

pieper avatar Jan 28 '21 13:01 pieper

Great! @WoonchanCho I have type annoations for the sr subpackage. We could then start from there. I will prepare a pull request.

hackermd avatar Jan 28 '21 14:01 hackermd

Sounds great! Then I will wait till @hackermd's pull request is merged into the master branch (or a new branch for this work) and begin working after it.

WoonchanCho avatar Jan 28 '21 15:01 WoonchanCho

Hi @hackermd, I just wanted to check the status on the type annotation for the sr subpackage. If you are busy for something or need to take more time I might begin to work and you can add on your work on it. I'm opened to anything so feel free to let me know.

WoonchanCho avatar Feb 02 '21 18:02 WoonchanCho

@WoonchanCho I have a type declarations file. It's not yet complete and I have yet tested its distribution via the npm. I will push what I have and then we can discuss outstanding TODO items. OK?

hackermd avatar Feb 02 '21 19:02 hackermd