menu
menu copied to clipboard
`Item` and `SubMenu` are exported as `any` in typescript typings
Menu
and Divider
is typed correctly:
But Item
and SubMenu
are not:
which is because of const connected
being of type any
:
hey, did you ever figure out a workaround for this?
@woodbridge nah, I just ignored that
import React,{ ComponentClass } from 'react'; import RcMenu, { SubMenu, MenuItem } from 'rc-menu'; import { SubMenuProps } from 'rc-menu/lib/SubMenu';
const RcSubMenu = SubMenu as ComponentClass<SubMenuProps>;