You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to the latest version, VS code tells me that there is a problem when I pass an Item to triggers.ItemStateChangeTrigger, because Item does not expose "__#5@#getToggleState"(): "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" which is defined here
Besides this method definition being obviously wrong (It should probably be getToggleState(): "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF"), I think triggers.d.ts should not expose its own Item definition, but rather use the one from items.d.ts.
The text was updated successfully, but these errors were encountered:
florian-h05
added a commit
to florian-h05/openhab-js
that referenced
this issue
Nov 3, 2024
#394 fixes the issue with "__#5@#getToggleState"(): "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF" by not making this method private anymore.
I think triggers.d.ts should not expose its own Item definition, but rather use the one from items.d.ts.
Yes, but our type definitions are emitted by the TypeScript compiler, which currently inlines type definitions.
This is an upstream issue: microsoft/TypeScript#37151
florian-h05
changed the title
types/triggers.d.ts should not expose its own Item definition
Type declarations should not inline type definitions
Nov 3, 2024
After upgrading to the latest version, VS code tells me that there is a problem when I pass an
Item
totriggers.ItemStateChangeTrigger
, becauseItem
does not expose"__#5@#getToggleState"(): "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF"
which is defined hereopenhab-js/types/triggers.d.ts
Line 36 in 7f2b7a4
Besides this method definition being obviously wrong (It should probably be
getToggleState(): "PAUSE" | "PLAY" | "OPEN" | "CLOSED" | "ON" | "OFF"
), I thinktriggers.d.ts
should not expose its ownItem
definition, but rather use the one fromitems.d.ts
.The text was updated successfully, but these errors were encountered: