From 590858a38debcbeb43de537d027555cc8e4fec4c Mon Sep 17 00:00:00 2001 From: nibbleswap Date: Tue, 10 Aug 2021 03:01:39 +0200 Subject: [PATCH] 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 Co-authored-by: Cheng Zhao --- docs/api/menu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/menu.md b/docs/api/menu.md index 4def1a18e1..fd8f81f352 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -162,7 +162,7 @@ const template = [ { role: 'services' }, { type: 'separator' }, { role: 'hide' }, - { role: 'hideothers' }, + { role: 'hideOthers' }, { role: 'unhide' }, { type: 'separator' }, { role: 'quit' }