Incompatible type exported for os.TrayOptions
jouni-kantola opened this issue · comments
The TypeScript API for os.setTray
expects param options as TrayOptions with property menu
instead of menuItems
:
interface TrayOptions {
icon?: string;
menu?: TrayMenuItem[];
}
In runtime, the application crashes if menu
is used. If on the other hand passed as menuItems
(as per described in the docs) everything works as expected, e.g.:
await os.setTray({
icon: "/resources/icons/my-app-icon.png",
// mismatching type defined with menu?: TrayMenuItem[];
menuItems: [
{
id: "OPEN",
text: "Open",
}
]
});