Suppose you have a type that has many intersections:
export type SimpleShape = {
color: string;
} & {
size: number;
} & {
shape: "circle" | "square";
};
When you hover over the type SimpleShape
with many intersections, it can be difficult to see the resolved type. It would be helpful if there was a way to prettify the display of these types.
With Prettify
we can using:
type Shape = Prettify<SimpleShape>;
// ^? type Shape = {
// color: string;
// size: number;
// shape: "circle" | "square";
// }
This is really helpful. Thank you, Matt!
Ok, thanks. Deadlines for coursework submission are close. I am also a student; I can feel how you feel but don't worry https://domypaper.com/ is here for timely and efficient writing assistance. Their dedicated team of writers is ready to help you excel in your academic endeavors. If you are in this situation, then visit domypaper to find out more.