Add TypeScript type declarations

- Add index.d.ts with comprehensive type definitions for all exported classes
- Include type declarations for Connection, NodeJSSerialConnection, and other connection types
- Add types for Constants, Advert, Packet, BufferUtils, and CayenneLpp
- Add type declarations for submodules (constants, buffer_reader, buffer_writer)
- Update package.json to reference the types file

This enables TypeScript users to have proper type checking and autocomplete when using the library.
This commit is contained in:
Manuel Bahamóndez-Honores 2026-01-24 08:47:07 -03:00
parent 9a979df471
commit 1f0b684beb
2 changed files with 188 additions and 0 deletions

View file

@ -3,6 +3,7 @@
"version": "1.10.0",
"description": "",
"main": "src/index.js",
"types": "index.d.ts",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"