Functions with object parameters - Incorrect param name shown (TS)
cole-robertson opened this issue · comments
Cole Robertson commented
I have an example like:
const {component} = useTreeReducer({editing: {
})
Where editing
is the generated inline param name. The interface type for the function useTreeReducer
is:
interface IProps {
editing?: boolean;
...
}
Specifically looks like it applies when syntax this style is used to defined a function:
const useTreeReducer = ({editing, ...}: IProps) => ...
I would expect that in this case inline params would not generate a name at all since the single parameter is just an unamed object. It seems to currently grab the first of the objects properties.