noble-uwp icon indicating copy to clipboard operation
noble-uwp copied to clipboard

Typescript import doesn't work with noble-uwp

Open seraekim opened this issue 6 years ago • 3 comments

First, I really appreciate that I no longer have to replace WinUSB and BTHUSB with noble-uwp.

I could use typescript syntax including import clause, testing "noble" by installing types/noble.

But, I couldn't do the same with noble-uwp.

To be honest, I am not that good at nodejs.

Would there be a way to solve this?

And I wonder whether on Windows OS as client side, this(kind of electron using noble) can mimic android apps having on/off toggle buttons to write 0 or 1 to things like arduino BLE LED diode to turn on and off the light.

I mean, should the client have to install visual studio, python and so on to install BLE app?

Thank you for reading.

seraekim avatar Apr 06 '18 13:04 seraekim

@seraekim : nobody has written types for noble-uwp, so they don't exist. If you want them then you or somebody else will have to make them.

Once there are published binaries then only developers will need visual studio and python.

ghost avatar Aug 16 '18 08:08 ghost

Since the types are identical to noble I think it should be possible to create a tiny .d.ts that just forwards the types from noble. I’m not sure exactly how to do that though.

jasongin avatar Aug 16 '18 14:08 jasongin

It could be done this way:

declare module "noble-uwp" {
    export * from "noble";
}

hwestphal avatar Oct 08 '18 13:10 hwestphal