Hacker News new | ask | show | jobs
by stnmtn 1739 days ago
I don't find it too bad to do

  interface IFunctionParameters {
    userId: string;
    name: string;
    age: number;
  }

  const example = ({userId, name, age}: IFunctionParameters) => {...}
1 comments

The most annoying thing about this to me (and to be clear, I do exactly this all the time) is when you mouseover `example` at a use site, all you see is `IFunctionParameters`, not the definition of `IFunctionParameters`. At least in VS Code.
That's a good point, I've lost count of the times I've hovered my mouse over that IFunctionParameters tooltip expecting a nested tooltip to appear with the actual types