(menu?: string | null)
| 16 | const menus: MenuI[] = []; |
| 17 | |
| 18 | const open = async (menu?: string | null): Promise<boolean> => { |
| 19 | const menuEl = await get(menu, true); |
| 20 | if (menuEl) { |
| 21 | return menuEl.open(); |
| 22 | } |
| 23 | return false; |
| 24 | }; |
| 25 | |
| 26 | const close = async (menu?: string | null): Promise<boolean> => { |
| 27 | const menuEl = await (menu !== undefined ? get(menu, true) : getOpen()); |