=== tests/cases/compiler/constructorReturningAPrimitive.ts === // technically not allowed by JavaScript but we don't have a 'not-primitive' constraint // functionally only possible when your class is otherwise devoid of members so of little consequence in practice class A { >A : A constructor() { return 1; >1 : number } } var a = new A(); >a : A >new A() : A >A : typeof A class B { >B : B >T : T constructor() { var x: T; >x : T >T : T return x; >x : T } } var b = new B(); >b : B >new B() : B >B : typeof B