I'm converting React project from jsx to tsx files.
i need full preview of types of one constant:
const canvasProps = {
setPorts,
setBoxes,
setLines,
selected,
setSelected,
actionState,
setActionState,
... // and more
};
on hover on canvasProps
I get the preview:
const canvasProps: {
setPorts: React.Dispatch<React.SetStateAction<{
shape: string;
id: string;
name: string;
port: portType;
ref: any;
}[]>>;
setBoxes: React.Dispatch<React.SetStateAction<BoxType[]>>;
... 13 more ...;
toggleFlowVisibility: (flow: any) => void;
}
I need to get the full type definition of this constant, which means see the extra 13 types.
(why I need this? I need to declare the properties of React.Context, which depends on functions that have not declared yet (inside a function component) )
so I do I get the full type definition without working hard?