-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type declarations should not inline type definitions #392
Comments
Private methods are not supported by .d.ts type declarations, so do not use them! Refs openhab#392. Signed-off-by: Florian Hotze <[email protected]>
#394 fixes the issue with
Yes, but our type definitions are emitted by the TypeScript compiler, which currently inlines type definitions. |
Private methods are not supported by .d.ts type declarations, so do not use them! Refs #392. Signed-off-by: Florian Hotze <[email protected]>
This might be solvable with Typescript 5.5, ref: microsoft/TypeScript#22160 Adding
to However, the resulting type def in in
Which looks a bit odd... |
I played around with TS 5.5 and was not able to solve the issue by using |
I think it solves one issue with the autosuggest, and introduces another. Currently After TS 5.5 and adding But when autosuggesting the parameters for |
Ultimately I think we won’t have a solution here as long as microsoft/TypeScript#37151 is open. |
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: