(menu?: string | null)
| 56 | }; |
| 57 | |
| 58 | const isOpen = async (menu?: string | null): Promise<boolean> => { |
| 59 | if (menu != null) { |
| 60 | const menuEl = await get(menu); |
| 61 | // eslint-disable-next-line @typescript-eslint/prefer-optional-chain |
| 62 | return menuEl !== undefined && menuEl.isOpen(); |
| 63 | } else { |
| 64 | const menuEl = await getOpen(); |
| 65 | return menuEl !== undefined; |
| 66 | } |
| 67 | }; |
| 68 | |
| 69 | const isEnabled = async (menu?: string | null): Promise<boolean> => { |
| 70 | const menuEl = await get(menu); |