Here's a scenario I'm working with:
interface IRenderComponent {
urlToHideAt?: string;
links?: IInternalNavbarLink[];
currentLink?: IInternalNavbarLink;
}
const renderComponent = ({ urlToHideAt, links, currentLink }: IRenderComponent) => {
It seems to make sense initially. I've made all children optional, but now I am encountering an error whenever I attempt to use the function,
Expected 1 arguments, but got 0.ts(2554)
This error is understandable. I specified the props as optional, not the overall argument.
My inquiry then becomes, how can I make the entire argument
{ urlToHideAt, links, currentLink }
optional? What approach should I take?