Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! Thank you for the project.
Fixes #52
Overview
I noticed discussion over at #52 about typings support, & personally I would benefit a lot from its ease-of-use. So, I went ahead & implemented it into the build process, (& taking note of the discussion thus) without migrating the entire project over to the Typescript language. This was done with some explicit JSDoc types over annonymous functions that TS didn't like, as well as some general improvements such as copying over the in-code explanations out for consumers to read inline.
Notes
_
because by default Typescript exports all JSDoc@typedefs
. In theory you should be able to assign the types to an unused variable & reference it withtypeof
, but I couldn't get it to work.@types/three
, which will now have to be tracked to thethree
version associated with the package. (Maybe consider making it a peer dependency in the future?)valid-jsdoc
, since it didn't like doing typings inline within the constructor. I assume this can be workarounded by doing@prop
on the class's JSDoc, but imo it becomes hard to trace when doing new implementations.