wemo-client icon indicating copy to clipboard operation
wemo-client copied to clipboard

Add typescript declarations

Open pascalmartin opened this issue 6 years ago • 2 comments

Hi

I use typescript in my project and i made the typescript declarations file for wemo-client module, The declaration file is not 100% complete but it a good base for other contributor.

http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

Exemple of use:

import Wemo = require('wemo-client');

const wemo: Wemo.Wemo = new Wemo();

wemo.discover((err: Error, device: Wemo.IDevice): void => {
    if (err) {
        Logger.log('error', err);
        return;
    }

    const client: Wemo.IClient = wemo.client(device);

    // ...
});

pascalmartin avatar Sep 25 '17 14:09 pascalmartin

Codecov Report

Merging #58 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #58   +/-   ##
=======================================
  Coverage   86.41%   86.41%           
=======================================
  Files           2        2           
  Lines         287      287           
  Branches       47       47           
=======================================
  Hits          248      248           
  Misses         39       39

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 718cb99...9f73be3. Read the comment docs.

codecov-io avatar Sep 25 '17 14:09 codecov-io

I'm not so much into Typescript but I'd say either make the declarations complete or leave them out altogether, right?

timonreinhard avatar Jan 05 '18 13:01 timonreinhard