Which of these values does TypeScript accept as class instances, and what does the code log?
None of the values are created with new. Say every error TypeScript reports, and what the code logs when you run it with its types removed.
class Point { constructor(public x: number, public y: number) {}} class Token { private secret = "t";} class Empty {} const point: Point = { x: 1, y: 2 };console.log(point instanceof Point); const token: Token = { secret: "t" };const empty: Empty = 42;console.log(empty);Work it out first: the compiler shows every error and type.
The answer
Work out every error TypeScript reports and every type it shows, line by line. Then check.
Checking your sign-in…