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:
nibbleswap 2021-08-10 03:01:39 +02:00 коммит произвёл GitHub
Родитель edb7413bae
Коммит 590858a38d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -162,7 +162,7 @@ const template = [
{ role: 'services' },
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hideothers' },
{ role: 'hideOthers' },
{ role: 'unhide' },
{ type: 'separator' },
{ role: 'quit' }