class C { constructor() { } } class D { constructor():number { } } // the return type of a constructor overrides the type of the class declare class Bar {} declare class Foo { constructor(iterable: U): Bar; } (new Foo('x'): Bar); // ok (new Foo(123): Bar); // error, number !~> string // also overrides when it returns a different specialization of the same class declare class Baz { constructor(iterable: U): Baz; } (new Baz('x'): Baz); // ok (new Baz(123): Baz); // error, number !~> string