athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

[TypeScript] `makeCapabilityInstance` signature error #26

Closed OlivierZal closed 1 year ago

OlivierZal commented 1 year ago
return device.makeCapabilityInstance(
  capability,
  async (value: number | string): Promise<void> => { ... }
)

raises the following typescript error:

Argument of type '(value: number | string) => Promise<void>' is not assignable to parameter of type '{ value: string | number | boolean; }'. ​typescript(2345)
OlivierZal commented 1 year ago

Is a duplicate of https://github.com/athombv/homey-web-api-issues/issues/33