ui5-typescript
ui5-typescript copied to clipboard
`sap.ui.Device.system` is undeclared
Example:
import Device from "sap/ui/Device"
if(Device.system.tablet) { // TS: Property "system" does not exist on type "Device"
...
}
TS does not recognize the property system
.
It is part of the public API https://sapui5.hana.ondemand.com/#/api/sap.ui.Device.system So I see no reason why it should not be supported.
Hi @sap-sebelao , yes this is a current glitch. Right now you can access Device.system
by directly importing it as named export from the "Device" module:
import { system } from "sap/ui/Device";
if (system.tablet) {...
Fixed with UI5 types 1.115.0
, see #311
Closing the issue.