JSDoc updates.

A load of JSDoc updates to provided better typing.