plasticrake / tplink-smarthome-api

TP-Link Smarthome WiFi API
MIT License
1.02k stars 141 forks source link

Add typing definitions #73

Closed ShayBox closed 3 years ago

ShayBox commented 5 years ago

Add typing definitions for typescript and javascript users (type intellisense in compatible editors)

I wouldn't recommend generating them from jsdoc, maybe initially to get help make the types but there are a lot of issues with just always generating them from jsdoc.

I would personally suggest replacing jsdoc with typings and generating docs from that, but you can also keep both just to not have to mess with doc generation, but the downside of that would be having to maintain the code, jsdoc, and typings.

jsdoc only provides types for the purpose of generating docs, while typing definitions allows typescript users to use the library, provides type sensing for compatible editors, and the purpose of generating docs.

plasticrake commented 3 years ago

Project has been converted to TypeScript! Closed by #99