Currently the props type of FileTree is:
export type FileTreeProps = HTMLAttributes<HTMLDivElement> & {
expanded?: Set<string>;
defaultExpanded?: Set<string>;
selectedPath?: string;
onSelect?: (path: string) => void;
onExpandedChange?: (expanded: Set<string>) => void;
};
Which inherited the HTMLAttributes<HTMLDivElement> so that the actual onSelect callback type will be (ReactEventHandler<HTMLDivElement> & ((path: string) => void)) | undefined