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 = {} as Props;
a.x = 3;

Or:

let a = <Props> {};

Which will do the same


This is called Type Assertion.

You can read about it in Basarat's "TypeScript Deep Dive", or in the official TypeScript handbook.

You can also watch this YouTube video for a nice introduction.