declare module 'd3-context-menu' {
  export interface ContextMenuItem {
    title: string;
    action?: (elm: any, data: any, index: number) => void;
    disabled?: boolean;
    divider?: boolean;
    children?: ContextMenuItem[];
  }

  function contextMenu(menuItems: ContextMenuItem[], options?: any): (this: any, event: Event, data?: any) => void;
  function contextMenu(command: string): void;
  
  export default contextMenu;
}
