Gets the type of thing a class creates. Helps you work with the result of creating a new thing from a class.
Example:
import { AssertGetConstructorTypeProp } from '@in/test'; class Player { name: string = "Player 1"; score: number = 0; } // This will be the type of a Player instance type PlayerInstance = AssertGetConstructorTypeProp<typeof Player>; // Now TypeScript knows this has name and score const player: PlayerInstance = new Player();
T extends AssertAnyConstructorProp
InstanceType<T>