fivdi / mcp-spi-adc

MCP3002/4/8, MCP3202/4/8 and MCP3304 SPI analog to digital conversion with Node.js
MIT License
62 stars 10 forks source link

Add TypeScript definitions #15

Closed DanRYoung closed 3 years ago

DanRYoung commented 3 years ago

This PR adds type definitions and documentation for all supported MCP3XXX devices. It's helpful for folks who use TypeScript for their projects or an editor which supports annotations.

Here's a VSCode example of types coming in handy: https://i.imgur.com/wX4t1uR.mp4

Closes #10.

Also, shout out to @fivdi and @rxseger for this excellent library! It's reduced the lift for me getting my temperature sensor working so much. Y'all are the best. Cheers!