Code QuizAdvanced

ConstructorParameters needs the class type

ConstructorParameters<T> operates on the constructor type, not the instance type.

Codetypescript
class Point {
  constructor(public x: number, public y: number) {}
}

type Args = ConstructorParameters<Point>; // Error

What is the bug in the ConstructorParameters usage?