developit / stockroom

🗃 Offload your store management to a worker easily.
https://stockroom.surge.sh
1.76k stars 57 forks source link

Added types. #20

Open loucyx opened 5 years ago

loucyx commented 5 years ago

I'm working a lot with TypeScript+Preact+Stockroom, and I needed types to make my workflow even better. Let's make everyone's worflow better with TS 😄

loucyx commented 5 years ago

This should solve both #22 and #21. To my credit compared to #22, I used JSDocs with the definitions to make them more clear 😄

Silic0nS0ldier commented 5 years ago

I'm all for having the JSDoc in the definitions. Had a bit of a debate when I was putting the types together for #22 and ultimately figured it would add to maintenance time (double handling of function docs).

🤔 I know that the TypeScript compiler is capable of linting regular JS via JSDoc. I wonder if definition files could be generated from that... Something I think I'll look into.