What does enclosing a class in angle brackets “” mean in TypeScript?
That’s called Type Assertion or casting. These are the same: let square = <Square>{}; let square = {} as Square; Example: interface Props { x: number; y: number; name: string; } let a = {}; a.x = 3; // error: Property ‘x’ does not exist on type `{}` So you can do: let a = … Read more