docs: fix camelcase in menu example (#30341)
* docs: fix camelcase in menu example and add hint to deal with TS error hideothers -> hideOthers (the TS compiler caught this) The TypeScript compiler also did not like the pattern used to switch between platforms for submenus was loosing the type information of the literal constants and generalized them as strings which conflicts with the type definition of MenuItemConstructorOptions. * docs: Fix spelling, added hint to TypeScript Without explicitly stating the type for the const template TypeScript does not create a with the correct shape due to generalization to strings. * remove ts hints Co-authored-by: a <a@b> Co-authored-by: Cheng Zhao <github@zcbenz.com>
This commit is contained in:
parent
edb7413bae
commit
590858a38d
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ const template = [
|
|||
{ role: 'services' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'hide' },
|
||||
{ role: 'hideothers' },
|
||||
{ role: 'hideOthers' },
|
||||
{ role: 'unhide' },
|
||||
{ type: 'separator' },
|
||||
{ role: 'quit' }
|
||||
|
|
Loading…
Reference in a new issue