Typescript?

Is there any typescript definitions available for homey entities?

meaning?

I am trying to write an app in typescript. But when I don’t have any type definitions available, such as:

interface Device {
  id: string;
  name: string;
  ...
}

I have to define them myself and maintain them in line with changes in the Homey code to ensure that type-related bugs in my code are avoided, which sort of limits the gains of defining types. So I was hoping there would be official type definitions that are maintained by the devs along with the changes in the Homey code/API.

The homey package contains type definitions: https://github.com/athombv/node-homey/tree/master/sdk/lib

1 Like

Ah, didn’t find them earlier, thanks!

For anyone else looking for these in the newest version of the sdk as they were removed…:

chore: remove sdk types by tjallingt · Pull Request #130 · athombv/node-homey · GitHub