Defining custom link prop types without breaking type inference
Props = { onClick: () => void } | { href: UrlObject }. I'm trying to replace the link part with tanstack router links, so I tried the following:However, picking seems to break type inference for
search and params (I can pass any search and param defined across the entire app). Anyone got an idea how I could achieve this?