-
So, i try to use as much Typescript as possible to avoid runtime errors, but UI5 react gives me one headache after another, e.g: Popover, as from your official playground:
Fails with
Why? Because So I wonder why do you even say you support Typescript if even basic functions needed to operate the component (e.g: popover needs to open) is not working? I end up using TS with loads of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @kbachl to use the publicly exposed methods of components you need to type your I also created a codesandbox which implements the behavior of your example. If you have a lot of ts-errors, forcing you to use One last thing, with our latest release we improved the typings of event-handlers, maybe this will solve some |
Beta Was this translation helpful? Give feedback.
Hello @kbachl
to use the publicly exposed methods of components you need to type your
ref
with the corresponding interface. For popovers this isUi5PopoverDomRef
. You can find all available interfaces for the main package here and for charts here.I also created a codesandbox which implements the behavior of your example.
If you have a lot of ts-errors, forcing you to use
ts-ignore
, please tell us where these errors are thrown and we will gladly try to find a solution and fix them. Without any reproducible examples there is unfortunately not much that we can do.One last thing, with our latest release we improved the typings of event-handlers, maybe this will solve some
ts-errors
for you …