dickydoouk / tp-link-tapo-connect

Unofficial Node.js library for connecting to TP-Link Tapo devices. Currently limited to the P100 & P105 smart plugs and L510E smart bulbs.
115 stars 41 forks source link

Export types in api.ts #10

Closed sebbo2002 closed 3 years ago

sebbo2002 commented 3 years ago

I noticed the following error when using the library:

node_modules/tp-link-tapo-connect/dist/api.d.ts:1:59 - error TS2307: Cannot find module './types' or its corresponding type declarations.

1 import { TapoDevice, TapoDeviceKey, TapoDeviceInfo } from "./types";

Renaming the file causes the types to be generated in dist. I have also exported the types in api.ts so that they can be used directly in Typescript projects.

dickydoouk commented 3 years ago

Thanks @sebbo2002 much appreciated. All merged. Will publish ASAP with these changes in.