neutralinojs / neutralino.js

JavaScript API for Neutralinojs
https://neutralino.js.org/docs/api/overview
MIT License
237 stars 47 forks source link

Fix type for tray options' menuItems property #79

Closed jouni-kantola closed 1 year ago

jouni-kantola commented 1 year ago

Fix #78

jouni-kantola commented 1 year ago

After trying this out for a bit, maybe the properties shouldn't be exported as optional. I suggest changing the interface TrayOptions to:

export interface TrayOptions {
    icon: string;
    menuItems: TrayMenuItem[];
}

The reasoning for this:

The above also matches the docs ("Optional" isn't mentioned).